Compare commits

..

127 Commits

Author SHA1 Message Date
Jeremy Ashkenas
ff0062b088 coffeescript 0.1.5, just for kicks 2009-12-26 21:25:37 -08:00
Jeremy Ashkenas
78589f5db1 docs for range comprehensiosn 2009-12-26 20:46:31 -08:00
Jeremy Ashkenas
903331f3ff got negative ranges working with (much, much) uglier compiled code 2009-12-26 20:35:43 -08:00
Jeremy Ashkenas
47b45c4494 removing no_paren -- it was optimizing away order of operations 2009-12-26 11:55:34 -08:00
Jeremy Ashkenas
c4844abb28 adding newline escaping, with tests 2009-12-26 09:29:03 -08:00
Jeremy Ashkenas
96ae6d80f3 docs 2009-12-26 09:05:57 -08:00
Jeremy Ashkenas
60342e8cd9 changed bin/coffee-script to bin/coffee 2009-12-26 08:57:13 -08:00
Jeremy Ashkenas
f9c3d3fc14 fixed range comprehension indexing 2009-12-26 00:27:49 -08:00
Jeremy Ashkenas
b1e25eea88 trading the cs> prompt for the coffee> prompt 2009-12-26 00:18:24 -08:00
Jeremy Ashkenas
1486bbab9f added array comprehensions over ranges 2009-12-26 00:16:40 -08:00
Jeremy Ashkenas
59d912cc26 docs for assignment-as-expression 2009-12-25 23:17:34 -08:00
Jeremy Ashkenas
9adf2e2d30 major internal reworking -- all variable declarations have been pushed up to the first line of the block scope -- all assignment is now an inherent expression 2009-12-25 22:57:33 -08:00
Jeremy Ashkenas
cf46fa8c2c started raising syntax errors for parens wrapped around expressions (they used to silently be ignored) 2009-12-25 20:36:22 -08:00
Jeremy Ashkenas
16ca3d1608 don't add the no_wrap key to the options hash unless we're going to use it 2009-12-25 19:48:47 -08:00
Jeremy Ashkenas
476a251c80 comment 2009-12-25 19:34:40 -08:00
Jeremy Ashkenas
274152aff7 documenting ranges and slices 2009-12-25 16:35:57 -08:00
Jeremy Ashkenas
00659e5f76 reorganizing test fixtures and adding range literals for array slices 2009-12-25 16:20:28 -08:00
Jeremy Ashkenas
88fe4f6fd1 CoffeeScript 0.1.4 2009-12-25 14:43:24 -08:00
Jeremy Ashkenas
03a90928e1 moved the coffeescript extension over from .cs to .coffee -- let's leave C# in peace. Changed array comprehensions to always return their mapped result, even when unassigned 2009-12-25 14:18:05 -08:00
Jeremy Ashkenas
67865d3341 stopped using __proto__, instead, using a variant of goog.inherits for extends and super() 2009-12-25 13:57:47 -08:00
Jeremy Ashkenas
0337513172 ForBody is really the ForSource 2009-12-25 13:40:57 -08:00
Jeremy Ashkenas
1ee2c53391 cleaned up the for grammar and eliminated a shift/reduce conflict 2009-12-25 13:39:33 -08:00
Jeremy Ashkenas
4b7c965101 make equals signs full equals of colons -- you can use them inside of object literals now too 2009-12-25 13:21:17 -08:00
Jeremy Ashkenas
11c394fb7e allowing = to assign 2009-12-25 07:42:27 -08:00
Jeremy Ashkenas
54a7c405e7 going back to familiar operators +: is just too strange 2009-12-25 07:31:51 -08:00
Jeremy Ashkenas
781f3b5fa4 added a test to make sure that chained calls work 2009-12-25 07:16:59 -08:00
Jeremy Ashkenas
2393472924 allowing chained function calls, one right after another 2009-12-25 07:08:57 -08:00
Jeremy Ashkenas
859ab7583f bumping to 0.1.3 ... here we go 2009-12-25 00:16:56 -08:00
Jeremy Ashkenas
3eedd5bb50 better error warnings on the command line 2009-12-25 00:02:27 -08:00
Jeremy Ashkenas
5b7e695f6c removed bin/cs in favor of a more comprehensive coffee-script command ... now with --interactive and --run 2009-12-24 23:57:27 -08:00
Jeremy Ashkenas
1e3182727b majorly cleaned up the CoffeeScript that defines the Narwhal integration 2009-12-24 23:28:01 -08:00
Jeremy Ashkenas
e595dbfcee the narwhal integration written in JavaScript has been replaced with CoffeeScript, and compiler-generated variable names now start with '__' 2009-12-24 23:09:24 -08:00
Jeremy Ashkenas
12b830893d sped up the execution test a good deal by running it all in one pass 2009-12-24 22:29:30 -08:00
Jeremy Ashkenas
cca80342aa making all assignment-y operators use a colon -- now it's +: -: *: /:, and friends 2009-12-24 22:25:29 -08:00
Jeremy Ashkenas
4412f590cf removed dependency on v8 in favor of bin/cs 2009-12-24 22:08:32 -08:00
tlrobinson
0cd2d78027 Print compiler errors to stderr 2009-12-24 19:34:17 -08:00
Jeremy Ashkenas
be672ebfc1 fixed the bin/cs repl to save assignment between commands by using the new --no-wrap 2009-12-24 17:45:23 -08:00
Jeremy Ashkenas
9047c87567 the --no-wrap option now disables top-level var declarations 2009-12-24 17:37:24 -08:00
Jeremy Ashkenas
31d630bb91 updating docs for isnt 2009-12-24 17:22:46 -08:00
Jeremy Ashkenas
7a2f5a333f trading aint for isnt -- let's be serious 2009-12-24 17:21:20 -08:00
Jeremy Ashkenas
66303636dc allowing quoted strings within object assignment, a in JS and JSON 2009-12-24 17:14:53 -08:00
Jeremy Ashkenas
9dc932e380 bumping to 0.1.2 to get the super()/extends fix out there 2009-12-24 17:05:55 -08:00
Jeremy Ashkenas
a71de4b5b6 got extends back in the language -- use it together with super 2009-12-24 16:49:23 -08:00
Jeremy Ashkenas
ada8dfc6d4 fixing super() calls, thanks to tolmasky 2009-12-24 16:23:23 -08:00
Jeremy Ashkenas
4112595368 removing the special-case std-reading in favor of '--eval' 2009-12-24 15:49:42 -08:00
Jeremy Ashkenas
c281db7730 document that -e can read from stdin 2009-12-24 15:35:58 -08:00
Jeremy Ashkenas
5e6b49ad1e with a working -n --no-wrap option to disable the top-level function safety wrapper 2009-12-24 15:31:00 -08:00
Jeremy Ashkenas
ec1a527575 Merge branch 'master' of git://github.com/tlrobinson/coffee-script 2009-12-24 15:05:56 -08:00
tlrobinson
dc0ab1afca Command line CoffeeScript 2009-12-24 14:42:57 -08:00
tlrobinson
ae72fbfd0d Narwhal support for CoffeeScript 2009-12-24 14:41:35 -08:00
tlrobinson
ad0735f765 Read from stdin if source is "-" 2009-12-24 14:40:39 -08:00
Jeremy Ashkenas
d49c178f1d added and -> &&, or -> || to the docs (they were missing) 2009-12-24 14:37:30 -08:00
Jeremy Ashkenas
8f8ba255b3 docs for 0.1.1 2009-12-24 12:02:28 -08:00
Jeremy Ashkenas
a4bc24817d bumping to 0.1.1 2009-12-24 11:59:19 -08:00
Jeremy Ashkenas
9eeac9b272 added the typeof operater as an OpNode 2009-12-24 11:50:44 -08:00
Jeremy Ashkenas
f859eb6cec added the instanceof operator to the grammar as an operation node 2009-12-24 11:46:51 -08:00
Jeremy Ashkenas
b29afc2c09 another wish 2009-12-24 10:31:44 -08:00
Jeremy Ashkenas
95b79973f9 docs 2009-12-24 09:56:44 -08:00
Jeremy Ashkenas
1f79733a33 added a wish list to the docs 2009-12-24 09:54:12 -08:00
Jeremy Ashkenas
cfc29f7830 doc tweaks 2009-12-24 01:38:32 -08:00
Jeremy Ashkenas
34486039e1 changing switch/case to switch/when -- it's a better word 2009-12-24 01:33:59 -08:00
Jeremy Ashkenas
53e8ea7d9e added comprehensive linting to the test suit 2009-12-24 00:49:11 -08:00
Jeremy Ashkenas
9841b78ed8 fixed the broken try/catch grammar 2009-12-24 00:45:16 -08:00
Jeremy Ashkenas
065cfddd0d with a more comprehensive execution test that uncovered some missing spots 2009-12-24 00:41:12 -08:00
Jeremy Ashkenas
6882a3d36c added some execution test 2009-12-24 00:12:07 -08:00
Jeremy Ashkenas
85c595e84c added readme 2009-12-23 23:12:29 -08:00
Jeremy Ashkenas
b8f563d49e first draft of docs are done 2009-12-23 23:01:39 -08:00
Jeremy Ashkenas
3b3d57e84a waypoint 2009-12-24 01:22:41 -05:00
Jeremy Ashkenas
a1ee622aa6 added git st with the new operator regex 2009-12-24 00:37:33 -05:00
Jeremy Ashkenas
64733981fd ported over a little more underscore 2009-12-23 21:09:32 -05:00
Jeremy Ashkenas
7833b11724 added the ! sign as an allowed operator 2009-12-23 21:00:04 -05:00
Jeremy Ashkenas
a7032d0964 ... 2009-12-23 20:57:35 -05:00
Jeremy Ashkenas
f2c872230e more better super docs, better switch docs 2009-12-23 20:48:55 -05:00
Jeremy Ashkenas
8d26488748 added yes, no, on and off as boolean aliases and a nice aliases section to the docs 2009-12-23 20:24:55 -05:00
Jeremy Ashkenas
d92ed46503 broken waypoint, but fixed line numbers with the new JS comments 2009-12-23 19:42:44 -05:00
Jeremy Ashkenas
777eac045a broken waypoint, but fixed line numbers with the new JS comments 2009-12-23 19:42:18 -05:00
Jeremy Ashkenas
37e2f3b944 for whatever reason, don't need to force else-bodies to compile as statements anymore ... let them do what they want 2009-12-22 12:18:27 -05:00
Jeremy Ashkenas
3902a8b268 removed all traces of 'extends' -- it's not any shorter or more convenient than just setting the prototype 2009-12-22 12:08:29 -05:00
Jeremy Ashkenas
63a910d7ce got comments within object and array literals working out 2009-12-22 11:50:43 -05:00
Jeremy Ashkenas
3cee51cc37 first draft of parsing and printing along comments -- unfortunately, not yet working within objects and arrays 2009-12-22 11:27:19 -05:00
Jeremy Ashkenas
45b559a721 passing through comments as tags on Values, but not printing them out quite yet... 2009-12-22 10:48:58 -05:00
Jeremy Ashkenas
7c59eb2c36 nice -- it's pushing down assignments properly (recursively) now 2009-12-22 10:16:53 -05:00
Jeremy Ashkenas
40f633b8d0 moderate refactor of nodes.rb -- tests pass and examples compile without warnings 2009-12-22 10:11:41 -05:00
Jeremy Ashkenas
4e3d7cb974 clean up children at exit -- had about twenty processes all watching and recompiling the docs 2009-12-21 12:15:13 -05:00
Jeremy Ashkenas
d14b127b60 documentation waypoint 2009-12-21 11:41:45 -05:00
Jeremy Ashkenas
0d566ed1ec added full complement of bitwise operators 2009-12-19 22:56:27 -05:00
Jeremy Ashkenas
d86f92c6f2 added full complement of bitwise operators 2009-12-19 22:55:58 -05:00
Jeremy Ashkenas
efc5150144 making the each fixture a little more like underscore, and avoiding passing assignment into functions from the outside 2009-12-19 00:45:36 -05:00
Jeremy Ashkenas
7474ed1a5e added the verbose option to the CLI 2009-12-19 00:37:54 -05:00
Jeremy Ashkenas
2f4433af71 more little fixes, lots of subtle things, added a verbose logging mode 2009-12-19 00:33:34 -05:00
Jeremy Ashkenas
91303efd2c lots of tweaks make the tests pass again 2009-12-18 23:13:59 -05:00
Jeremy Ashkenas
d73ff9a79f patched up array comprehensions somewhat. Parens are still a necessary evil, and there's still probably plenty of edge cases 2009-12-18 22:30:09 -05:00
Jeremy Ashkenas
7ec6300a48 little fixes more examples 2009-12-18 09:55:31 -05:00
Jeremy Ashkenas
42c84fc54b adding css for syntax highlighting 2009-12-18 08:36:20 -05:00
Jeremy Ashkenas
f0a790d624 todo to-done 2009-12-18 07:40:26 -05:00
Jeremy Ashkenas
fdcff7aaf0 finished the first draft of the parser test 2009-12-18 07:28:26 -05:00
Jeremy Ashkenas
ab2362e372 adding comprehensive attr_readers to the AST for testing 2009-12-18 07:21:59 -05:00
Jeremy Ashkenas
98cf9f5af2 parser test raises some minor improvements (remove unnecessary ValueNode arrays, etc 2009-12-18 07:11:01 -05:00
Jeremy Ashkenas
e74af51a7d adding an initial lexer test 2009-12-18 06:59:06 -05:00
Jeremy Ashkenas
35b5d8c630 after a lot of grammar wrestling, got the if-else chains to parse unambiguously. Now you only need a single period to close chains of any length. 2009-12-18 00:49:23 -05:00
Jeremy Ashkenas
8575d91c66 finally got the function/object/variable assignment indentation straightened out, I think 2009-12-17 23:45:24 -05:00
Jeremy Ashkenas
8338f124be compiling if-else chains into nice flat ones 2009-12-17 23:34:52 -05:00
Jeremy Ashkenas
be19f7ad4f first major rework of the nodes -- still need more comments and templatish cleanup, but character tagging is all settled 2009-12-17 23:22:02 -05:00
Jeremy Ashkenas
5c737d29ab renamed Nodes to Expressions 2009-12-17 22:58:40 -05:00
Jeremy Ashkenas
92c59ea4a5 finished commenting everything but the nodes -- they're up next 2009-12-17 22:54:24 -05:00
Jeremy Ashkenas
dd28074436 finished commenting the grammar 2009-12-17 22:22:35 -05:00
Jeremy Ashkenas
f8ab30fa42 many more comments, plus a fix for inner-assignment indentation 2009-12-17 22:13:29 -05:00
Jeremy Ashkenas
581ad8ba1e commented the command-line interface 2009-12-17 21:57:21 -05:00
Jeremy Ashkenas
5703c1ed6d moved the TextMate bundle into the gem, added a command to install it 2009-12-17 21:46:12 -05:00
Jeremy Ashkenas
a71a3cdf3f added the 'delete' operator 2009-12-17 21:21:07 -05:00
Jeremy Ashkenas
f5d31b78e6 removed the 'default' keyword in favor of an 'else' 2009-12-17 21:14:36 -05:00
Jeremy Ashkenas
e1e6bb72c6 removed class checks in favor of statement? 2009-12-17 21:10:49 -05:00
Jeremy Ashkenas
d89ca33cdb number examples 2009-12-17 21:00:31 -05:00
Jeremy Ashkenas
58ecfeb815 added exponential and hex numbers 2009-12-17 20:59:19 -05:00
Jeremy Ashkenas
955d01a302 added a nice --watch mode to continually recompile or relint (or reprint) your coffeescripts 2009-12-17 20:37:39 -05:00
Jeremy Ashkenas
f8a5f7595d cleanups getting underscore to compile 2009-12-17 10:33:57 -05:00
Jeremy Ashkenas
9f33cf19ad added nice syntax errors 2009-12-17 10:04:43 -05:00
Jeremy Ashkenas
6deb85e083 passing through values with line number information that look and act like Ruby natives 2009-12-17 09:37:42 -05:00
Jeremy Ashkenas
9ad108281e cleaned up lexer in order to add line numbers 2009-12-17 09:29:49 -05:00
Jeremy Ashkenas
cd0091c045 added the ability to super() 2009-12-17 09:07:42 -05:00
Jeremy Ashkenas
01ecae2c55 allowing inner slashes in regexes 2009-12-17 08:29:19 -05:00
Jeremy Ashkenas
cef4bcd756 supporting escaped quotes in strings 2009-12-17 08:26:46 -05:00
Jeremy Ashkenas
ad50bd7154 supporting escaped quotes in strings 2009-12-17 08:26:20 -05:00
Jeremy Ashkenas
b97f9cf5ec multiline strings 2009-12-17 08:23:17 -05:00
Jeremy Ashkenas
2d65d3d73b multiline strings 2009-12-17 08:23:07 -05:00
Jeremy Ashkenas
733a76fdba built the first gem -- works just fine 2009-12-16 23:10:03 -05:00
Jeremy Ashkenas
fd63698005 completely reorganized for a gem and the 'coffee-script' command 2009-12-16 22:42:53 -05:00
352 changed files with 8088 additions and 97202 deletions

10
.gitignore vendored
View File

@@ -1,10 +1,2 @@
raw
presentation
test.coffee
test*.coffee
test.litcoffee
test*.litcoffee
test/*.js
parser.output
/node_modules
npm-debug.log*
*.gem

View File

View File

@@ -1,9 +0,0 @@
## How to contribute to CoffeeScript
* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffeescript/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one.
* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffeescript/tree/master/test).
* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffeescript/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide).
* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release.

418
Cakefile
View File

@@ -1,418 +0,0 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore'
{ spawn, exec, execSync } = require 'child_process'
CoffeeScript = require './lib/coffee-script'
helpers = require './lib/coffee-script/helpers'
# ANSI Terminal Colors.
bold = red = green = reset = ''
unless process.env.NODE_DISABLE_COLORS
bold = '\x1B[0;1m'
red = '\x1B[0;31m'
green = '\x1B[0;32m'
reset = '\x1B[0m'
# Built file header.
header = """
/**
* CoffeeScript Compiler v#{CoffeeScript.VERSION}
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
"""
# Used in folder names like `docs/v1`.
majorVersion = parseInt CoffeeScript.VERSION.split('.')[0], 10
# Log a message with a color.
log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '')
spawnNodeProcess = (args, output = 'stderr', callback) ->
relayOutput = (buffer) -> console.log buffer.toString()
proc = spawn 'node', args
proc.stdout.on 'data', relayOutput if output is 'both' or output is 'stdout'
proc.stderr.on 'data', relayOutput if output is 'both' or output is 'stderr'
proc.on 'exit', (status) -> callback(status) if typeof callback is 'function'
# Run a CoffeeScript through our node/coffee interpreter.
run = (args, callback) ->
spawnNodeProcess ['bin/coffee'].concat(args), 'stderr', (status) ->
process.exit(1) if status isnt 0
callback() if typeof callback is 'function'
# Build the CoffeeScript language from source.
buildParser = ->
helpers.extend global, require 'util'
require 'jison'
parser = require('./lib/coffee-script/grammar').parser.generate()
# Patch Jisons output, until https://github.com/zaach/jison/pull/339 is accepted,
# to ensure that require('fs') is only called where it exists.
parser = parser.replace "var source = require('fs')", """
var source = '';
var fs = require('fs');
if (typeof fs !== 'undefined' && fs !== null)
source = fs"""
fs.writeFileSync 'lib/coffee-script/parser.js', parser
buildExceptParser = (callback) ->
files = fs.readdirSync 'src'
files = ('src/' + file for file in files when file.match(/\.(lit)?coffee$/))
run ['-c', '-o', 'lib/coffee-script'].concat(files), callback
build = (callback) ->
buildParser()
buildExceptParser callback
testBuiltCode = (watch = no) ->
csPath = './lib/coffee-script'
csDir = path.dirname require.resolve csPath
for mod of require.cache when csDir is mod[0 ... csDir.length]
delete require.cache[mod]
testResults = runTests require csPath
unless watch
process.exit 1 unless testResults
buildAndTest = (includingParser = yes, harmony = no) ->
process.stdout.write '\x1Bc' # Clear terminal screen.
execSync 'git checkout lib/*', stdio: [0,1,2] # Reset the generated compiler.
buildArgs = ['bin/cake']
buildArgs.push if includingParser then 'build' else 'build:except-parser'
log "building#{if includingParser then ', including parser' else ''}...", green
spawnNodeProcess buildArgs, 'both', ->
log 'testing...', green
testArgs = if harmony then ['--harmony'] else []
testArgs = testArgs.concat ['bin/cake', 'test']
spawnNodeProcess testArgs, 'both'
watchAndBuildAndTest = (harmony = no) ->
buildAndTest yes, harmony
fs.watch 'src/', interval: 200, (eventType, filename) ->
if eventType is 'change'
log "src/#{filename} changed, rebuilding..."
buildAndTest (filename is 'grammar.coffee'), harmony
fs.watch 'test/', {interval: 200, recursive: yes}, (eventType, filename) ->
if eventType is 'change'
log "test/#{filename} changed, rebuilding..."
buildAndTest no, harmony
task 'build', 'build the CoffeeScript compiler from source', build
task 'build:parser', 'build the Jison parser only', buildParser
task 'build:except-parser', 'build the CoffeeScript compiler, except for the Jison parser', buildExceptParser
task 'build:full', 'build the CoffeeScript compiler from source twice, and run the tests', ->
build ->
build testBuiltCode
task 'build:browser', 'build the merged script for inclusion in the browser', ->
code = """
require['../../package.json'] = (function() {
return #{fs.readFileSync "./package.json"};
})();
"""
for name in ['helpers', 'rewriter', 'lexer', 'parser', 'scope', 'nodes', 'sourcemap', 'coffee-script', 'browser']
code += """
require['./#{name}'] = (function() {
var exports = {}, module = {exports: exports};
#{fs.readFileSync "lib/coffee-script/#{name}.js"}
return module.exports;
})();
"""
code = """
(function(root) {
var CoffeeScript = function() {
function require(path){ return require[path]; }
#{code}
return require['./coffee-script'];
}();
if (typeof define === 'function' && define.amd) {
define(function() { return CoffeeScript; });
} else {
root.CoffeeScript = CoffeeScript;
}
}(this));
"""
unless process.env.MINIFY is 'false'
{compiledCode: code} = require('google-closure-compiler-js').compile
jsCode: [
src: code
languageOut: if majorVersion is 1 then 'ES5' else 'ES6'
]
outputFolder = "docs/v#{majorVersion}/browser-compiler"
fs.mkdirSync outputFolder unless fs.existsSync outputFolder
fs.writeFileSync "#{outputFolder}/coffee-script.js", header + '\n' + code
console.log "built ... running browser tests:"
invoke 'test:browser'
task 'build:watch', 'watch and continually rebuild the CoffeeScript compiler, running tests on each build', ->
watchAndBuildAndTest()
task 'build:watch:harmony', 'watch and continually rebuild the CoffeeScript compiler, running harmony tests on each build', ->
watchAndBuildAndTest yes
buildDocs = (watch = no) ->
# Constants
indexFile = 'documentation/index.html'
versionedSourceFolder = "documentation/v#{majorVersion}"
sectionsSourceFolder = 'documentation/sections'
examplesSourceFolder = 'documentation/examples'
outputFolder = "docs/v#{majorVersion}"
# Helpers
releaseHeader = (date, version, prevVersion) ->
monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
formatDate = (date) ->
date.replace /^(\d\d\d\d)-(\d\d)-(\d\d)$/, (match, $1, $2, $3) ->
"#{monthNames[$2 - 1]} #{+$3}, #{$1}"
"""
<div class="anchor" id="#{version}"></div>
<h2 class="header">
#{prevVersion and "<a href=\"https://github.com/jashkenas/coffeescript/compare/#{prevVersion}...#{version}\">#{version}</a>" or version}
<span class="timestamp"> &mdash; <time datetime="#{date}">#{formatDate date}</time></span>
</h2>
"""
codeFor = require "./documentation/v#{majorVersion}/code.coffee"
htmlFor = ->
markdownRenderer = require('markdown-it')
html: yes
typographer: yes
# Add some custom overrides to Markdown-Its rendering, per
# https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer
defaultFence = markdownRenderer.renderer.rules.fence
markdownRenderer.renderer.rules.fence = (tokens, idx, options, env, slf) ->
code = tokens[idx].content
if code.indexOf('codeFor(') is 0 or code.indexOf('releaseHeader(') is 0
"<%= #{code} %>"
else
"<blockquote class=\"uneditable-code-block\">#{defaultFence.apply @, arguments}</blockquote>"
(file, bookmark) ->
md = fs.readFileSync "#{sectionsSourceFolder}/#{file}.md", 'utf-8'
md = md.replace /<%= releaseHeader %>/g, releaseHeader
md = md.replace /<%= majorVersion %>/g, majorVersion
md = md.replace /<%= fullVersion %>/g, CoffeeScript.VERSION
html = markdownRenderer.render md
html = _.template(html)
codeFor: codeFor()
releaseHeader: releaseHeader
include = ->
(file) ->
file = "#{versionedSourceFolder}/#{file}" if file.indexOf('/') is -1
output = fs.readFileSync file, 'utf-8'
if /\.html$/.test(file)
render = _.template output
output = render
releaseHeader: releaseHeader
majorVersion: majorVersion
fullVersion: CoffeeScript.VERSION
htmlFor: htmlFor()
codeFor: codeFor()
include: include()
output
# Task
do renderIndex = ->
render = _.template fs.readFileSync(indexFile, 'utf-8')
output = render
include: include()
fs.writeFileSync "#{outputFolder}/index.html", output
log 'compiled', green, "#{indexFile} → #{outputFolder}/index.html"
try
fs.symlinkSync "v#{majorVersion}/index.html", 'docs/index.html'
catch exception
if watch
for target in [indexFile, versionedSourceFolder, examplesSourceFolder, sectionsSourceFolder]
fs.watch target, interval: 200, renderIndex
log 'watching...', green
task 'doc:site', 'build the documentation for the website', ->
buildDocs()
task 'doc:site:watch', 'watch and continually rebuild the documentation for the website', ->
buildDocs yes
buildDocTests = (watch = no) ->
# Constants
testFile = 'documentation/test.html'
testsSourceFolder = 'test'
outputFolder = "docs/v#{majorVersion}"
# Included in test.html
testHelpers = fs.readFileSync('test/support/helpers.coffee', 'utf-8').replace /exports\./g, '@'
# Helpers
testsInScriptBlocks = ->
output = ''
for filename in fs.readdirSync testsSourceFolder
if filename.indexOf('.coffee') isnt -1
type = 'coffeescript'
else if filename.indexOf('.litcoffee') isnt -1
type = 'literate-coffeescript'
else
continue
# Set the type to text/x-coffeescript or text/x-literate-coffeescript
# to prevent the browser compiler from automatically running the script
output += """
<script type="text/x-#{type}" class="test" id="#{filename.split('.')[0]}">
#{fs.readFileSync "test/#{filename}", 'utf-8'}
</script>\n
"""
output
# Task
do renderTest = ->
render = _.template fs.readFileSync(testFile, 'utf-8')
output = render
testHelpers: testHelpers
tests: testsInScriptBlocks()
fs.writeFileSync "#{outputFolder}/test.html", output
log 'compiled', green, "#{testFile} → #{outputFolder}/test.html"
if watch
for target in [testFile, testsSourceFolder]
fs.watch target, interval: 200, renderTest
log 'watching...', green
task 'doc:test', 'build the browser-based tests', ->
buildDocTests()
task 'doc:test:watch', 'watch and continually rebuild the browser-based tests', ->
buildDocTests yes
buildAnnotatedSource = (watch = no) ->
do generateAnnotatedSource = ->
exec "node_modules/docco/bin/docco src/*.*coffee --output docs/v#{majorVersion}/annotated-source", (err) -> throw err if err
log 'generated', green, "annotated source in docs/v#{majorVersion}/annotated-source/"
if watch
fs.watch 'src/', interval: 200, generateAnnotatedSource
log 'watching...', green
task 'doc:source', 'build the annotated source documentation', ->
buildAnnotatedSource()
task 'doc:source:watch', 'watch and continually rebuild the annotated source documentation', ->
buildAnnotatedSource yes
task 'release', 'build and test the CoffeeScript source, and build the documentation', ->
invoke 'build:full'
invoke 'build:browser'
invoke 'doc:site'
invoke 'doc:test'
invoke 'doc:source'
task 'bench', 'quick benchmark of compilation time', ->
{Rewriter} = require './lib/coffee-script/rewriter'
sources = ['coffee-script', 'grammar', 'helpers', 'lexer', 'nodes', 'rewriter']
coffee = sources.map((name) -> fs.readFileSync "src/#{name}.coffee").join '\n'
litcoffee = fs.readFileSync("src/scope.litcoffee").toString()
fmt = (ms) -> " #{bold}#{ " #{ms}".slice -4 }#{reset} ms"
total = 0
now = Date.now()
time = -> total += ms = -(now - now = Date.now()); fmt ms
tokens = CoffeeScript.tokens coffee, rewrite: no
littokens = CoffeeScript.tokens litcoffee, rewrite: no, literate: yes
tokens = tokens.concat(littokens)
console.log "Lex #{time()} (#{tokens.length} tokens)"
tokens = new Rewriter().rewrite tokens
console.log "Rewrite#{time()} (#{tokens.length} tokens)"
nodes = CoffeeScript.nodes tokens
console.log "Parse #{time()}"
js = nodes.compile bare: yes
console.log "Compile#{time()} (#{js.length} chars)"
console.log "total #{ fmt total }"
# Run the CoffeeScript test suite.
runTests = (CoffeeScript) ->
CoffeeScript.register()
startTime = Date.now()
currentFile = null
passedTests = 0
failures = []
global[name] = func for name, func of require 'assert'
# Convenience aliases.
global.CoffeeScript = CoffeeScript
global.Repl = require './lib/coffee-script/repl'
# Our test helper function for delimiting different test cases.
global.test = (description, fn) ->
try
fn.test = {description, currentFile}
fn.call(fn)
++passedTests
catch e
failures.push
filename: currentFile
error: e
description: description if description?
source: fn.toString() if fn.toString?
helpers.extend global, require './test/support/helpers'
# When all the tests have run, collect and print errors.
# If a stacktrace is available, output the compiled function source.
process.on 'exit', ->
time = ((Date.now() - startTime) / 1000).toFixed(2)
message = "passed #{passedTests} tests in #{time} seconds#{reset}"
return log(message, green) unless failures.length
log "failed #{failures.length} and #{message}", red
for fail in failures
{error, filename, description, source} = fail
console.log ''
log " #{description}", red if description
log " #{error.stack}", red
console.log " #{source}" if source
return
# Run every test in the `test` folder, recording failures.
files = fs.readdirSync 'test'
for file in files when helpers.isCoffee file
literate = helpers.isLiterate file
currentFile = filename = path.join 'test', file
code = fs.readFileSync filename
try
CoffeeScript.run code.toString(), {filename, literate}
catch error
failures.push {filename, error}
return !failures.length
task 'test', 'run the CoffeeScript language test suite', ->
runTests CoffeeScript
task 'test:browser', 'run the test suite against the merged browser script', ->
source = fs.readFileSync "docs/v#{majorVersion}/browser-compiler/coffee-script.js", 'utf-8'
result = {}
global.testingBrowser = yes
(-> eval source).call result
runTests result.CoffeeScript

View File

@@ -1,4 +1,4 @@
Copyright (c) 2009-2017 Jeremy Ashkenas
Copyright (c) 2009 Jeremy Ashkenas
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -19,4 +19,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
OTHER DEALINGS IN THE SOFTWARE.

38
README Normal file
View File

@@ -0,0 +1,38 @@
=
{
} } {
{ { } }
} }{ {
{ }{ } } _____ __ __
( }{ }{ { ) / ____| / _|/ _|
.- { { } { }} -. | | ___ | |_| |_ ___ ___
( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \
|`-..________ ..-'| | |___| (_) | | | || __/ __/
| | \_____\___/|_| |_| \___|\___|
| ;--.
| (__ \ _____ _ _
| | ) ) / ____| (_) | |
| |/ / | (___ ___ _ __ _ _ __ | |_
| ( / \___ \ / __| '__| | '_ \| __|
| |/ ____) | (__| | | | |_) | |_
| | |_____/ \___|_| |_| .__/ \__|
`-.._________..-' | |
|_|
CoffeeScript is a little language that compiles into JavaScript.
Install the compiler:
gem install coffee-script
Compile a script:
coffee /path/to/script.coffee
For documentation, usage, and examples, see:
http://jashkenas.github.com/coffee-script/
To suggest a feature or report a bug:
http://github.com/jashkenas/coffee-script/issues/
The source repository:
git://github.com/jashkenas/coffee-script.git

View File

@@ -1,57 +0,0 @@
{
} } {
{ { } }
} }{ {
{ }{ } } _____ __ __
{ }{ }{ { } / ____| / _|/ _|
.- { { } { }} -. | | ___ | |_| |_ ___ ___
( { } { } { } } ) | | / _ \| _| _/ _ \/ _ \
|`-..________ ..-'| | |___| (_) | | | || __/ __/
| | \_____\___/|_| |_| \___|\___|
| ;--.
| (__ \ _____ _ _
| | ) ) / ____| (_) | |
| |/ / | (___ ___ _ __ _ _ __ | |_
| ( / \___ \ / __| '__| | '_ \| __|
| |/ ____) | (__| | | | |_) | |_
| | |_____/ \___|_| |_| .__/ \__|
`-.._________..-' | |
|_|
CoffeeScript is a little language that compiles into JavaScript.
## Installation
If you have the node package manager, npm, installed:
```shell
npm install --global coffee-script
```
Leave off the `--global` if you dont wish to install globally.
## Getting Started
Execute a script:
```shell
coffee /path/to/script.coffee
```
Compile a script:
```shell
coffee -c /path/to/script.coffee
```
For documentation, usage, and examples, see: http://coffeescript.org/
To suggest a feature or report a bug: http://github.com/jashkenas/coffeescript/issues
If youd like to chat, drop by #coffeescript on Freenode IRC.
The source repository: https://github.com/jashkenas/coffeescript.git
Changelog: http://coffeescript.org/#changelog
Our lovely and talented contributors are listed here: http://github.com/jashkenas/coffeescript/contributors

59
Rakefile Normal file
View File

@@ -0,0 +1,59 @@
require 'erb'
require 'fileutils'
require 'rake/testtask'
desc "Run all tests"
task :test do
$LOAD_PATH.unshift(File.expand_path('test'))
require 'redgreen' if Gem.available?('redgreen')
require 'test/unit'
Dir['test/*/**/test_*.rb'].each {|test| require test }
end
namespace :build do
desc "Recompile the Racc parser (pass -v and -g for verbose debugging)"
task :parser, :racc_args do |t, args|
sh "racc #{args[:racc_args]} -o lib/coffee_script/parser.rb lib/coffee_script/grammar.y"
end
desc "Compile the Narwhal interface for --interactive and --run"
task :narwhal do
sh "bin/coffee lib/coffee_script/narwhal/*.coffee -o lib/coffee_script/narwhal/js"
end
end
desc "Build the documentation page"
task :doc do
source = 'documentation/index.html.erb'
child = fork { exec "bin/coffee documentation/coffee/*.coffee -o documentation/js -w" }
at_exit { Process.kill("INT", child) }
Signal.trap("INT") { exit }
loop do
mtime = File.stat(source).mtime
if !@mtime || mtime > @mtime
rendered = ERB.new(File.read(source)).result(binding)
File.open('index.html', 'w+') {|f| f.write(rendered) }
end
@mtime = mtime
sleep 1
end
end
namespace :gem do
desc 'Build and install the coffee-script gem'
task :install do
sh "gem build coffee-script.gemspec"
sh "sudo gem install #{Dir['*.gem'].join(' ')} --local --no-ri --no-rdoc"
end
desc 'Uninstall the coffee-script gem'
task :uninstall do
sh "sudo gem uninstall -x coffee-script"
end
end
task :default => :test

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env node
var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/coffee-script/cake').run();

View File

@@ -1,7 +1,5 @@
#!/usr/bin/env node
#!/usr/bin/env ruby
var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require "#{File.dirname(__FILE__)}/../lib/coffee_script/command_line.rb"
require(lib + '/coffee-script/command').run();
CoffeeScript::CommandLine.new

View File

@@ -1,19 +0,0 @@
{
"name": "coffee-script",
"main": [
"lib/coffee-script/coffee-script.js"
],
"description": "Unfancy JavaScript",
"keywords": [
"javascript",
"language",
"coffeescript",
"compiler"
],
"author": {
"name": "Jeremy Ashkenas"
},
"ignore": [
"test"
]
}

26
coffee-script.gemspec Normal file
View File

@@ -0,0 +1,26 @@
Gem::Specification.new do |s|
s.name = 'coffee-script'
s.version = '0.1.5' # Keep version in sync with coffee-script.rb
s.date = '2009-12-26'
s.homepage = "http://jashkenas.github.com/coffee-script/"
s.summary = "The CoffeeScript Compiler"
s.description = <<-EOS
CoffeeScript is a little language that compiles into JavaScript. Think
of it as JavaScript's less ostentatious kid brother -- the same genes,
roughly the same height, but a different sense of style. Apart from a
handful of bonus goodies, statements in CoffeeScript correspond
one-to-one with their equivalent in JavaScript, it's just another
way of saying it.
EOS
s.authors = ['Jeremy Ashkenas']
s.email = 'jashkenas@gmail.com'
s.rubyforge_project = 'coffee-script'
s.has_rdoc = false
s.require_paths = ['lib']
s.executables = ['coffee']
s.files = Dir['bin/*', 'examples/*', 'lib/**/*', 'coffee-script.gemspec', 'LICENSE', 'README']
end

View File

@@ -1 +0,0 @@
coffeescript.org

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1 +0,0 @@
v1/index.html

View File

@@ -1,17 +0,0 @@
{
"name": "",
"icons": [
{
"src": "\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png"
},
{
"src": "\/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image\/png"
}
],
"theme_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="916.000000pt" height="916.000000pt" viewBox="0 0 916.000000 916.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,916.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M5555 8253 c-199 -8 -487 -49 -670 -94 -283 -70 -464 -155 -829 -387
-307 -196 -461 -259 -721 -297 -134 -20 -345 -19 -442 1 -160 33 -243 104
-243 208 0 59 38 103 118 139 159 72 516 78 707 11 l70 -24 40 28 c94 66 62
162 -73 213 -90 34 -196 48 -352 48 -404 1 -684 -104 -767 -286 -22 -48 -25
-65 -21 -138 8 -147 86 -267 241 -368 192 -125 402 -184 702 -194 248 -9 474
23 699 99 148 50 244 94 565 262 375 197 551 266 806 319 207 43 297 52 535
51 194 0 238 -3 319 -22 199 -46 311 -131 311 -235 0 -125 -160 -221 -435
-262 -333 -50 -606 26 -685 191 -25 50 -31 52 -128 29 -258 -61 -317 -257
-117 -390 157 -104 371 -149 700 -149 539 1 944 133 1084 352 108 171 68 386
-105 557 -195 192 -518 305 -959 335 -143 9 -193 10 -350 3z"/>
<path d="M1095 7556 c-323 -132 -512 -261 -576 -391 -35 -73 -33 -161 5 -235
139 -267 715 -511 1644 -696 1114 -222 2726 -285 4162 -163 584 49 1082 129
1590 255 590 146 1001 330 1155 518 135 165 92 351 -120 513 -68 52 -250 153
-276 153 -7 0 1 -15 18 -32 74 -77 93 -189 48 -286 -88 -189 -401 -351 -950
-491 -589 -149 -1176 -233 -2060 -293 -302 -21 -1490 -17 -1815 5 -988 68
-1692 183 -2240 366 -363 122 -575 252 -646 397 -58 118 -25 250 88 357 34 31
59 57 57 57 -2 -1 -40 -16 -84 -34z"/>
<path d="M554 6215 c42 -244 59 -335 76 -415 53 -243 141 -560 215 -779 19
-58 35 -108 35 -112 0 -4 -43 -38 -97 -75 -176 -126 -380 -340 -500 -527 -113
-176 -202 -394 -245 -602 -20 -96 -23 -139 -23 -330 0 -198 3 -229 24 -315 47
-189 122 -347 237 -500 235 -313 529 -501 879 -560 109 -19 341 -14 475 9 106
18 460 129 484 152 6 5 -15 9 -50 9 -158 0 -384 62 -556 152 -224 117 -495
354 -622 546 -119 178 -177 338 -216 592 -62 402 38 761 288 1030 l60 65 22
-50 c175 -407 322 -695 457 -894 59 -86 238 -340 398 -566 414 -584 421 -593
471 -701 97 -210 179 -432 220 -599 19 -80 58 -137 172 -252 180 -182 363
-282 727 -398 303 -96 462 -132 770 -177 128 -18 1029 -18 1175 0 304 39 499
81 780 169 266 83 422 160 600 294 77 58 207 185 257 251 15 20 35 38 43 41
10 2 21 34 33 93 37 180 111 402 199 595 23 50 146 230 360 530 518 724 597
846 743 1142 270 549 475 1133 614 1752 45 203 92 447 88 452 -2 2 -22 -19
-45 -46 -153 -181 -518 -355 -1007 -479 -1503 -383 -3714 -462 -5485 -196
-390 58 -751 129 -988 195 -511 141 -861 305 -1025 482 -46 50 -48 51 -43 22z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -1,299 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>browser.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>browser.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>This <strong>Browser</strong> compatibility layer extends core CoffeeScript functions
to make things work smoothly when compiling code directly in the browser.
We add support for loading remote Coffee scripts via <strong>XHR</strong>, and
<code>text/coffeescript</code> script tags, source maps via data-URLs, and so on.</p>
</div>
<div class="content"><div class='highlight'><pre>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffee-script'</span>
CoffeeScript.<span class="hljs-built_in">require</span> = <span class="hljs-built_in">require</span>
compile = CoffeeScript.compile</pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Use standard JavaScript <code>eval</code> to eval code.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.eval = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
options.bare ?= <span class="hljs-literal">on</span>
eval compile code, options</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Running code does not provide access to this scope.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.run = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
options.bare = <span class="hljs-literal">on</span>
options.shiftLine = <span class="hljs-literal">on</span>
Function(compile code, options)()</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>If were not in a browser environment, were finished with the public API.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> <span class="hljs-built_in">window</span>?</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Include source maps where possible. If weve got a base64 encoder, a
JSON serializer, and tools for escaping unicode characters, were good to go.
Ported from <a href="https://developer.mozilla.org/en-US/docs/DOM/window.btoa">https://developer.mozilla.org/en-US/docs/DOM/window.btoa</a></p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> btoa? <span class="hljs-keyword">and</span> JSON?
<span class="hljs-function"> <span class="hljs-title">compile</span> = <span class="hljs-params">(code, options = {})</span> -&gt;</span>
options.inlineMap = <span class="hljs-literal">true</span>
CoffeeScript.compile code, options</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Load a remote script from the current domain via XHR.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.load = <span class="hljs-function"><span class="hljs-params">(url, callback, options = {}, hold = <span class="hljs-literal">false</span>)</span> -&gt;</span>
options.sourceFiles = [url]
xhr = <span class="hljs-keyword">if</span> <span class="hljs-built_in">window</span>.ActiveXObject
<span class="hljs-keyword">new</span> <span class="hljs-built_in">window</span>.ActiveXObject(<span class="hljs-string">'Microsoft.XMLHTTP'</span>)
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">new</span> <span class="hljs-built_in">window</span>.XMLHttpRequest()
xhr.open <span class="hljs-string">'GET'</span>, url, <span class="hljs-literal">true</span>
xhr.overrideMimeType <span class="hljs-string">'text/plain'</span> <span class="hljs-keyword">if</span> <span class="hljs-string">'overrideMimeType'</span> <span class="hljs-keyword">of</span> xhr
xhr.onreadystatechange = <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">if</span> xhr.readyState <span class="hljs-keyword">is</span> <span class="hljs-number">4</span>
<span class="hljs-keyword">if</span> xhr.status <span class="hljs-keyword">in</span> [<span class="hljs-number">0</span>, <span class="hljs-number">200</span>]
param = [xhr.responseText, options]
CoffeeScript.run param... <span class="hljs-keyword">unless</span> hold
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"Could not load <span class="hljs-subst">#{url}</span>"</span>
callback param <span class="hljs-keyword">if</span> callback
xhr.send <span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Activate CoffeeScript in the browser by having it compile and evaluate
all script tags with a content-type of <code>text/coffeescript</code>.
This happens on page load.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">runScripts</span> = -&gt;</span>
scripts = <span class="hljs-built_in">window</span>.<span class="hljs-built_in">document</span>.getElementsByTagName <span class="hljs-string">'script'</span>
coffeetypes = [<span class="hljs-string">'text/coffeescript'</span>, <span class="hljs-string">'text/literate-coffeescript'</span>]
coffees = (s <span class="hljs-keyword">for</span> s <span class="hljs-keyword">in</span> scripts <span class="hljs-keyword">when</span> s.type <span class="hljs-keyword">in</span> coffeetypes)
index = <span class="hljs-number">0</span>
<span class="hljs-function">
<span class="hljs-title">execute</span> = -&gt;</span>
param = coffees[index]
<span class="hljs-keyword">if</span> param <span class="hljs-keyword">instanceof</span> Array
CoffeeScript.run param...
index++
execute()
<span class="hljs-keyword">for</span> script, i <span class="hljs-keyword">in</span> coffees
<span class="hljs-keyword">do</span> (script, i) -&gt;
options = literate: script.type <span class="hljs-keyword">is</span> coffeetypes[<span class="hljs-number">1</span>]
source = script.src <span class="hljs-keyword">or</span> script.getAttribute(<span class="hljs-string">'data-src'</span>)
<span class="hljs-keyword">if</span> source
CoffeeScript.load source,
<span class="hljs-function"><span class="hljs-params">(param)</span> -&gt;</span>
coffees[i] = param
execute()
options
<span class="hljs-literal">true</span>
<span class="hljs-keyword">else</span>
options.sourceFiles = [<span class="hljs-string">'embedded'</span>]
coffees[i] = [script.innerHTML, options]
execute()</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Listen for window load, both in decent browsers and in IE.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">window</span>.addEventListener
<span class="hljs-built_in">window</span>.addEventListener <span class="hljs-string">'DOMContentLoaded'</span>, runScripts, <span class="hljs-literal">no</span>
<span class="hljs-keyword">else</span>
<span class="hljs-built_in">window</span>.attachEvent <span class="hljs-string">'onload'</span>, runScripts</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,345 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>cake.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>cake.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p><code>cake</code> is a simplified version of <a href="http://www.gnu.org/software/make/">Make</a>
(<a href="http://rake.rubyforge.org/">Rake</a>, <a href="http://github.com/280north/jake">Jake</a>)
for CoffeeScript. You define tasks with names and descriptions in a Cakefile,
and can call them from the command line, or invoke them from other tasks.</p>
<p>Running <code>cake</code> with no arguments will print out a list of all the tasks in the
current directorys Cakefile.</p>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>External dependencies.</p>
</div>
<div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffee-script'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Register .coffee extension</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.register()</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Keep track of the list of defined tasks, the accepted options, and so on.</p>
</div>
<div class="content"><div class='highlight'><pre>tasks = {}
options = {}
switches = []
oparse = <span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Mixin the top-level Cake functions for Cakefiles to use directly.</p>
</div>
<div class="content"><div class='highlight'><pre>helpers.extend <span class="hljs-built_in">global</span>,</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Define a Cake task with a short name, an optional sentence description,
and the function to run as the action itself.</p>
</div>
<div class="content"><div class='highlight'><pre> task: <span class="hljs-function"><span class="hljs-params">(name, description, action)</span> -&gt;</span>
[action, description] = [description, action] <span class="hljs-keyword">unless</span> action
tasks[name] = {name, description, action}</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Define an option that the Cakefile accepts. The parsed options hash,
containing all of the command-line options passed, will be made available
as the first argument to the action.</p>
</div>
<div class="content"><div class='highlight'><pre> option: <span class="hljs-function"><span class="hljs-params">(letter, flag, description)</span> -&gt;</span>
switches.push [letter, flag, description]</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Invoke another task in the current Cakefile.</p>
</div>
<div class="content"><div class='highlight'><pre> invoke: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
missingTask name <span class="hljs-keyword">unless</span> tasks[name]
tasks[name].action options</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Run <code>cake</code>. Executes all of the tasks you pass, in order. Note that Nodes
asynchrony may cause tasks to execute in a different order than youd expect.
If no tasks are passed, print the help screen. Keep a reference to the
original directory name, when running Cake tasks from subdirectories.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function">-&gt;</span>
<span class="hljs-built_in">global</span>.__originalDirname = fs.realpathSync <span class="hljs-string">'.'</span>
process.chdir cakefileDirectory __originalDirname
args = process.argv[<span class="hljs-number">2.</span>.]
CoffeeScript.run fs.readFileSync(<span class="hljs-string">'Cakefile'</span>).toString(), filename: <span class="hljs-string">'Cakefile'</span>
oparse = <span class="hljs-keyword">new</span> optparse.OptionParser switches
<span class="hljs-keyword">return</span> printTasks() <span class="hljs-keyword">unless</span> args.length
<span class="hljs-keyword">try</span>
options = oparse.parse(args)
<span class="hljs-keyword">catch</span> e
<span class="hljs-keyword">return</span> fatalError <span class="hljs-string">"<span class="hljs-subst">#{e}</span>"</span>
invoke arg <span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> options.arguments</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Display the list of Cake tasks in a format similar to <code>rake -T</code></p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">printTasks</span> = -&gt;</span>
relative = path.relative <span class="hljs-keyword">or</span> path.resolve
cakefilePath = path.join relative(__originalDirname, process.cwd()), <span class="hljs-string">'Cakefile'</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"<span class="hljs-subst">#{cakefilePath}</span> defines the following tasks:\n"</span>
<span class="hljs-keyword">for</span> name, task <span class="hljs-keyword">of</span> tasks
spaces = <span class="hljs-number">20</span> - name.length
spaces = <span class="hljs-keyword">if</span> spaces &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> Array(spaces + <span class="hljs-number">1</span>).join(<span class="hljs-string">' '</span>) <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
desc = <span class="hljs-keyword">if</span> task.description <span class="hljs-keyword">then</span> <span class="hljs-string">"# <span class="hljs-subst">#{task.description}</span>"</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"cake <span class="hljs-subst">#{name}</span><span class="hljs-subst">#{spaces}</span> <span class="hljs-subst">#{desc}</span>"</span>
<span class="hljs-built_in">console</span>.log oparse.help() <span class="hljs-keyword">if</span> switches.length</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Print an error and exit when attempting to use an invalid task/option.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">fatalError</span> = <span class="hljs-params">(message)</span> -&gt;</span>
<span class="hljs-built_in">console</span>.error message + <span class="hljs-string">'\n'</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">'To see a list of all tasks/options, run "cake"'</span>
process.exit <span class="hljs-number">1</span>
<span class="hljs-function">
<span class="hljs-title">missingTask</span> = <span class="hljs-params">(task)</span> -&gt;</span> fatalError <span class="hljs-string">"No such task: <span class="hljs-subst">#{task}</span>"</span></pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>When <code>cake</code> is invoked, search in the current and all parent directories
to find the relevant Cakefile.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">cakefileDirectory</span> = <span class="hljs-params">(dir)</span> -&gt;</span>
<span class="hljs-keyword">return</span> dir <span class="hljs-keyword">if</span> fs.existsSync path.join dir, <span class="hljs-string">'Cakefile'</span>
parent = path.normalize path.join dir, <span class="hljs-string">'..'</span>
<span class="hljs-keyword">return</span> cakefileDirectory parent <span class="hljs-keyword">unless</span> parent <span class="hljs-keyword">is</span> dir
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"Cakefile not found in <span class="hljs-subst">#{process.cwd()}</span>"</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,982 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>coffee-script.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>coffee-script.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>CoffeeScript can be used both on the server, as a command-line compiler based
on Node.js/V8, or to run CoffeeScript directly in the browser. This module
contains the main entry functions for tokenizing, parsing, and compiling
source CoffeeScript into JavaScript.</p>
</div>
<div class="content"><div class='highlight'><pre>
fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
{Lexer} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./lexer'</span>
{parser} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./parser'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
SourceMap = <span class="hljs-built_in">require</span> <span class="hljs-string">'./sourcemap'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Require <code>package.json</code>, which is two levels above this file, as this file is
evaluated from <code>lib/coffee-script</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>packageJson = <span class="hljs-built_in">require</span> <span class="hljs-string">'../../package.json'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>The current CoffeeScript version number.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.VERSION = packageJson.version
exports.FILE_EXTENSIONS = [<span class="hljs-string">'.coffee'</span>, <span class="hljs-string">'.litcoffee'</span>, <span class="hljs-string">'.coffee.md'</span>]</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Expose helpers for testing.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.helpers = helpers</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Function that allows for btoa in both nodejs and the browser.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">base64encode</span> = <span class="hljs-params">(src)</span> -&gt;</span> <span class="hljs-keyword">switch</span>
<span class="hljs-keyword">when</span> <span class="hljs-keyword">typeof</span> Buffer <span class="hljs-keyword">is</span> <span class="hljs-string">'function'</span>
<span class="hljs-keyword">new</span> Buffer(src).toString(<span class="hljs-string">'base64'</span>)
<span class="hljs-keyword">when</span> <span class="hljs-keyword">typeof</span> btoa <span class="hljs-keyword">is</span> <span class="hljs-string">'function'</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>The contents of a <code>&lt;script&gt;</code> block are encoded via UTF-16, so if any extended
characters are used in the block, btoa will fail as it maxes out at UTF-8.
See <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem">https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem</a>
for the gory details, and for the solution implemented here.</p>
</div>
<div class="content"><div class='highlight'><pre> btoa encodeURIComponent(src).replace <span class="hljs-regexp">/%([0-9A-F]{2})/g</span>, <span class="hljs-function"><span class="hljs-params">(match, p1)</span> -&gt;</span>
String.fromCharCode <span class="hljs-string">'0x'</span> + p1
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error(<span class="hljs-string">'Unable to base64 encode inline sourcemap.'</span>)</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Function wrapper to add source file information to SyntaxErrors thrown by the
lexer/parser/compiler.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">withPrettyErrors</span> = <span class="hljs-params">(fn)</span> -&gt;</span>
(code, options = {}) -&gt;
<span class="hljs-keyword">try</span>
fn.call @, code, options
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">if</span> <span class="hljs-keyword">typeof</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'string'</span> <span class="hljs-comment"># Support `CoffeeScript.nodes(tokens)`.</span>
<span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, code, options.filename</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>For each compiled file, save its source in memory in case we need to
recompile it later. We might need to recompile if the first compilation
didnt create a source map (faster) but something went wrong and we need
a stack trace. Assuming that most of the time, code isnt throwing
exceptions, its probably more efficient to compile twice only when we
need a stack trace, rather than always generating a source map even when
its not likely to be used. Save in form of <code>filename</code>: <code>(source)</code></p>
</div>
<div class="content"><div class='highlight'><pre>sources = {}</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Also save source maps if generated, in form of <code>filename</code>: <code>(source map)</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>sourceMaps = {}</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Compile CoffeeScript code to JavaScript, using the Coffee/Jison compiler.</p>
<p>If <code>options.sourceMap</code> is specified, then <code>options.filename</code> must also be
specified. All options that can be passed to <code>SourceMap#generate</code> may also
be passed here.</p>
<p>This returns a javascript string, unless <code>options.sourceMap</code> is passed,
in which case this returns a <code>{js, v3SourceMap, sourceMap}</code>
object, where sourceMap is a sourcemap.coffee#SourceMap object, handy for
doing programmatic lookups.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.compile = compile = withPrettyErrors (code, options) -&gt;
{merge, extend} = helpers
options = extend {}, options</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Always generate a source map if no filename is passed in, since without a
a filename we have no way to retrieve this source later in the event that
we need to recompile it to get a source map for <code>prepareStackTrace</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> generateSourceMap = options.sourceMap <span class="hljs-keyword">or</span> options.inlineMap <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> options.filename?
filename = options.filename <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>
sources[filename] = code
map = <span class="hljs-keyword">new</span> SourceMap <span class="hljs-keyword">if</span> generateSourceMap
tokens = lexer.tokenize code, options</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Pass a list of referenced variables, so that generated variables wont get
the same name.</p>
</div>
<div class="content"><div class='highlight'><pre> options.referencedVars = (
token[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">when</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>
)</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Check for import or export; if found, force bare mode.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> options.bare? <span class="hljs-keyword">and</span> options.bare <span class="hljs-keyword">is</span> <span class="hljs-literal">yes</span>
<span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens
<span class="hljs-keyword">if</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">'IMPORT'</span>, <span class="hljs-string">'EXPORT'</span>]
options.bare = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">break</span>
fragments = parser.parse(tokens).compileToFragments options
currentLine = <span class="hljs-number">0</span>
currentLine += <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> options.header
currentLine += <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> options.shiftLine
currentColumn = <span class="hljs-number">0</span>
js = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> fragment <span class="hljs-keyword">in</span> fragments</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Update the sourcemap with data from each fragment.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> generateSourceMap</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Do not include empty, whitespace, or semicolon-only fragments.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> fragment.locationData <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> <span class="hljs-regexp">/^[;\s]*$/</span>.test fragment.code
map.add(
[fragment.locationData.first_line, fragment.locationData.first_column]
[currentLine, currentColumn]
{noReplace: <span class="hljs-literal">true</span>})
newLines = helpers.count fragment.code, <span class="hljs-string">"\n"</span>
currentLine += newLines
<span class="hljs-keyword">if</span> newLines
currentColumn = fragment.code.length - (fragment.code.lastIndexOf(<span class="hljs-string">"\n"</span>) + <span class="hljs-number">1</span>)
<span class="hljs-keyword">else</span>
currentColumn += fragment.code.length</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Copy the code from each fragment into the final JavaScript.</p>
</div>
<div class="content"><div class='highlight'><pre> js += fragment.code
<span class="hljs-keyword">if</span> options.header
header = <span class="hljs-string">"Generated by CoffeeScript <span class="hljs-subst">#{@VERSION}</span>"</span>
js = <span class="hljs-string">"// <span class="hljs-subst">#{header}</span>\n<span class="hljs-subst">#{js}</span>"</span>
<span class="hljs-keyword">if</span> generateSourceMap
v3SourceMap = map.generate(options, code)
sourceMaps[filename] = map
<span class="hljs-keyword">if</span> options.inlineMap
encoded = base64encode JSON.stringify v3SourceMap
sourceMapDataURI = <span class="hljs-string">"//# sourceMappingURL=data:application/json;base64,<span class="hljs-subst">#{encoded}</span>"</span>
sourceURL = <span class="hljs-string">"//# sourceURL=<span class="hljs-subst">#{options.filename ? <span class="hljs-string">'coffeescript'</span>}</span>"</span>
js = <span class="hljs-string">"<span class="hljs-subst">#{js}</span>\n<span class="hljs-subst">#{sourceMapDataURI}</span>\n<span class="hljs-subst">#{sourceURL}</span>"</span>
<span class="hljs-keyword">if</span> options.sourceMap
{
js
sourceMap: map
v3SourceMap: JSON.stringify v3SourceMap, <span class="hljs-literal">null</span>, <span class="hljs-number">2</span>
}
<span class="hljs-keyword">else</span>
js</pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Tokenize a string of CoffeeScript code, and return the array of tokens.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.tokens = withPrettyErrors (code, options) -&gt;
lexer.tokenize code, options</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Parse a string of CoffeeScript code or an array of lexed tokens, and
return the AST. You can then compile it by calling <code>.compile()</code> on the root,
or traverse it by using <code>.traverseChildren()</code> with a callback.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.nodes = withPrettyErrors (source, options) -&gt;
<span class="hljs-keyword">if</span> <span class="hljs-keyword">typeof</span> source <span class="hljs-keyword">is</span> <span class="hljs-string">'string'</span>
parser.parse lexer.tokenize source, options
<span class="hljs-keyword">else</span>
parser.parse source</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Compile and execute a string of CoffeeScript (on the server), correctly
setting <code>__filename</code>, <code>__dirname</code>, and relative <code>require()</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
mainModule = <span class="hljs-built_in">require</span>.main</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Set the filename.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.filename = process.argv[<span class="hljs-number">1</span>] =
<span class="hljs-keyword">if</span> options.filename <span class="hljs-keyword">then</span> fs.realpathSync(options.filename) <span class="hljs-keyword">else</span> <span class="hljs-string">'&lt;anonymous&gt;'</span></pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Clear the module cache.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.moduleCache <span class="hljs-keyword">and</span>= {}</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Assign paths for node_modules loading</p>
</div>
<div class="content"><div class='highlight'><pre> dir = <span class="hljs-keyword">if</span> options.filename?
path.dirname fs.realpathSync options.filename
<span class="hljs-keyword">else</span>
fs.realpathSync <span class="hljs-string">'.'</span>
mainModule.paths = <span class="hljs-built_in">require</span>(<span class="hljs-string">'module'</span>)._nodeModulePaths dir</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Compile.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> helpers.isCoffee(mainModule.filename) <span class="hljs-keyword">or</span> <span class="hljs-built_in">require</span>.extensions
answer = compile code, options
code = answer.js ? answer
mainModule._compile code, mainModule.filename</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
The CoffeeScript REPL uses this to run the input.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.eval = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> code = code.trim()
createContext = vm.Script.createContext ? vm.createContext
isContext = vm.isContext ? (ctx) -&gt;
options.sandbox <span class="hljs-keyword">instanceof</span> createContext().constructor
<span class="hljs-keyword">if</span> createContext
<span class="hljs-keyword">if</span> options.sandbox?
<span class="hljs-keyword">if</span> isContext options.sandbox
sandbox = options.sandbox
<span class="hljs-keyword">else</span>
sandbox = createContext()
sandbox[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options.sandbox
sandbox.<span class="hljs-built_in">global</span> = sandbox.root = sandbox.GLOBAL = sandbox
<span class="hljs-keyword">else</span>
sandbox = <span class="hljs-built_in">global</span>
sandbox.__filename = options.filename || <span class="hljs-string">'eval'</span>
sandbox.__dirname = path.dirname sandbox.__filename</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>define module/require only if they chose not to specify their own</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> sandbox <span class="hljs-keyword">isnt</span> <span class="hljs-built_in">global</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">module</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">require</span>
Module = <span class="hljs-built_in">require</span> <span class="hljs-string">'module'</span>
sandbox.<span class="hljs-built_in">module</span> = _module = <span class="hljs-keyword">new</span> Module(options.modulename || <span class="hljs-string">'eval'</span>)
sandbox.<span class="hljs-built_in">require</span> = _require = <span class="hljs-function"><span class="hljs-params">(path)</span> -&gt;</span> Module._load path, _module, <span class="hljs-literal">true</span>
_module.filename = sandbox.__filename
<span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> Object.getOwnPropertyNames <span class="hljs-built_in">require</span> <span class="hljs-keyword">when</span> r <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'paths'</span>, <span class="hljs-string">'arguments'</span>, <span class="hljs-string">'caller'</span>]
_require[r] = <span class="hljs-built_in">require</span>[r]</pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>use the same hack node currently uses for their own REPL</p>
</div>
<div class="content"><div class='highlight'><pre> _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
_require.resolve = <span class="hljs-function"><span class="hljs-params">(request)</span> -&gt;</span> Module._resolveFilename request, _module
o = {}
o[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options
o.bare = <span class="hljs-literal">on</span> <span class="hljs-comment"># ensure return value</span>
js = compile code, o
<span class="hljs-keyword">if</span> sandbox <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js
<span class="hljs-keyword">else</span>
vm.runInContext js, sandbox
exports.register = <span class="hljs-function">-&gt;</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./register'</span></pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Throw error with deprecation warning when depending upon implicit <code>require.extensions</code> registration</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">require</span>.extensions
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> @FILE_EXTENSIONS <span class="hljs-keyword">then</span> <span class="hljs-keyword">do</span> (ext) -&gt;
<span class="hljs-built_in">require</span>.extensions[ext] ?= <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"""
Use CoffeeScript.register() or require the coffee-script/register module to require <span class="hljs-subst">#{ext}</span> files.
"""</span>
exports._compileFile = <span class="hljs-function"><span class="hljs-params">(filename, sourceMap = <span class="hljs-literal">no</span>, inlineMap = <span class="hljs-literal">no</span>)</span> -&gt;</span>
raw = fs.readFileSync filename, <span class="hljs-string">'utf8'</span></pre></div></div>
</li>
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Strip the Unicode byte order mark, if this file begins with one.</p>
</div>
<div class="content"><div class='highlight'><pre> stripped = <span class="hljs-keyword">if</span> raw.charCodeAt(<span class="hljs-number">0</span>) <span class="hljs-keyword">is</span> <span class="hljs-number">0xFEFF</span> <span class="hljs-keyword">then</span> raw.substring <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> raw
<span class="hljs-keyword">try</span>
answer = compile stripped, {
filename, sourceMap, inlineMap
sourceFiles: [filename]
literate: helpers.isLiterate filename
}
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>As the filename and code of a dynamically loaded file will be different
from the original file compiled with CoffeeScript.run, add that
information to error so it can be pretty-printed later.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, stripped, filename
answer</pre></div></div>
</li>
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Instantiate a Lexer for our use here.</p>
</div>
<div class="content"><div class='highlight'><pre>lexer = <span class="hljs-keyword">new</span> Lexer</pre></div></div>
</li>
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>The real Lexer produces a generic stream of tokens. This object provides a
thin wrapper around it, compatible with the Jison API. We can then pass it
directly as a “Jison lexer”.</p>
</div>
<div class="content"><div class='highlight'><pre>parser.lexer =
lex: <span class="hljs-function">-&gt;</span>
token = parser.tokens[@pos++]
<span class="hljs-keyword">if</span> token
[tag, @yytext, @yylloc] = token
parser.errorToken = token.origin <span class="hljs-keyword">or</span> token
@yylineno = @yylloc.first_line
<span class="hljs-keyword">else</span>
tag = <span class="hljs-string">''</span>
tag
setInput: <span class="hljs-function"><span class="hljs-params">(tokens)</span> -&gt;</span>
parser.tokens = tokens
@pos = <span class="hljs-number">0</span>
upcomingInput: <span class="hljs-function">-&gt;</span>
<span class="hljs-string">""</span></pre></div></div>
</li>
<li id="section-32">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-32">&#182;</a>
</div>
<p>Make all the AST nodes visible to the parser.</p>
</div>
<div class="content"><div class='highlight'><pre>parser.yy = <span class="hljs-built_in">require</span> <span class="hljs-string">'./nodes'</span></pre></div></div>
</li>
<li id="section-33">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-33">&#182;</a>
</div>
<p>Override Jisons default error handling function.</p>
</div>
<div class="content"><div class='highlight'><pre>parser.yy.parseError = <span class="hljs-function"><span class="hljs-params">(message, {token})</span> -&gt;</span></pre></div></div>
</li>
<li id="section-34">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-34">&#182;</a>
</div>
<p>Disregard Jisons message, it contains redundant line number information.
Disregard the token, we take its value directly from the lexer in case
the error is caused by a generated token which might refer to its origin.</p>
</div>
<div class="content"><div class='highlight'><pre> {errorToken, tokens} = parser
[errorTag, errorText, errorLoc] = errorToken
errorText = <span class="hljs-keyword">switch</span>
<span class="hljs-keyword">when</span> errorToken <span class="hljs-keyword">is</span> tokens[tokens.length - <span class="hljs-number">1</span>]
<span class="hljs-string">'end of input'</span>
<span class="hljs-keyword">when</span> errorTag <span class="hljs-keyword">in</span> [<span class="hljs-string">'INDENT'</span>, <span class="hljs-string">'OUTDENT'</span>]
<span class="hljs-string">'indentation'</span>
<span class="hljs-keyword">when</span> errorTag <span class="hljs-keyword">in</span> [<span class="hljs-string">'IDENTIFIER'</span>, <span class="hljs-string">'NUMBER'</span>, <span class="hljs-string">'INFINITY'</span>, <span class="hljs-string">'STRING'</span>, <span class="hljs-string">'STRING_START'</span>, <span class="hljs-string">'REGEX'</span>, <span class="hljs-string">'REGEX_START'</span>]
errorTag.replace(<span class="hljs-regexp">/_START$/</span>, <span class="hljs-string">''</span>).toLowerCase()
<span class="hljs-keyword">else</span>
helpers.nameWhitespaceCharacter errorText</pre></div></div>
</li>
<li id="section-35">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
</div>
<p>The second argument has a <code>loc</code> property, which should have the location
data for this token. Unfortunately, Jison seems to send an outdated <code>loc</code>
(from the previous token), so we take the location information directly
from the lexer.</p>
</div>
<div class="content"><div class='highlight'><pre> helpers.throwSyntaxError <span class="hljs-string">"unexpected <span class="hljs-subst">#{errorText}</span>"</span>, errorLoc</pre></div></div>
</li>
<li id="section-36">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-36">&#182;</a>
</div>
<p>Based on <a href="http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js">http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js</a>
Modified to handle sourceMap</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">formatSourcePosition</span> = <span class="hljs-params">(frame, getSourceMapping)</span> -&gt;</span>
filename = <span class="hljs-literal">undefined</span>
fileLocation = <span class="hljs-string">''</span>
<span class="hljs-keyword">if</span> frame.isNative()
fileLocation = <span class="hljs-string">"native"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">if</span> frame.isEval()
filename = frame.getScriptNameOrSourceURL()
fileLocation = <span class="hljs-string">"<span class="hljs-subst">#{frame.getEvalOrigin()}</span>, "</span> <span class="hljs-keyword">unless</span> filename
<span class="hljs-keyword">else</span>
filename = frame.getFileName()
filename <span class="hljs-keyword">or</span>= <span class="hljs-string">"&lt;anonymous&gt;"</span>
line = frame.getLineNumber()
column = frame.getColumnNumber()</pre></div></div>
</li>
<li id="section-37">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-37">&#182;</a>
</div>
<p>Check for a sourceMap position</p>
</div>
<div class="content"><div class='highlight'><pre> source = getSourceMapping filename, line, column
fileLocation =
<span class="hljs-keyword">if</span> source
<span class="hljs-string">"<span class="hljs-subst">#{filename}</span>:<span class="hljs-subst">#{source[<span class="hljs-number">0</span>]}</span>:<span class="hljs-subst">#{source[<span class="hljs-number">1</span>]}</span>"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"<span class="hljs-subst">#{filename}</span>:<span class="hljs-subst">#{line}</span>:<span class="hljs-subst">#{column}</span>"</span>
functionName = frame.getFunctionName()
isConstructor = frame.isConstructor()
isMethodCall = <span class="hljs-keyword">not</span> (frame.isToplevel() <span class="hljs-keyword">or</span> isConstructor)
<span class="hljs-keyword">if</span> isMethodCall
methodName = frame.getMethodName()
typeName = frame.getTypeName()
<span class="hljs-keyword">if</span> functionName
tp = <span class="hljs-keyword">as</span> = <span class="hljs-string">''</span>
<span class="hljs-keyword">if</span> typeName <span class="hljs-keyword">and</span> functionName.indexOf typeName
tp = <span class="hljs-string">"<span class="hljs-subst">#{typeName}</span>."</span>
<span class="hljs-keyword">if</span> methodName <span class="hljs-keyword">and</span> functionName.indexOf(<span class="hljs-string">".<span class="hljs-subst">#{methodName}</span>"</span>) <span class="hljs-keyword">isnt</span> functionName.length - methodName.length - <span class="hljs-number">1</span>
<span class="hljs-keyword">as</span> = <span class="hljs-string">" [as <span class="hljs-subst">#{methodName}</span>]"</span>
<span class="hljs-string">"<span class="hljs-subst">#{tp}</span><span class="hljs-subst">#{functionName}</span><span class="hljs-subst">#{<span class="hljs-keyword">as</span>}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"<span class="hljs-subst">#{typeName}</span>.<span class="hljs-subst">#{methodName <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> isConstructor
<span class="hljs-string">"new <span class="hljs-subst">#{functionName <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> functionName
<span class="hljs-string">"<span class="hljs-subst">#{functionName}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span>
fileLocation
<span class="hljs-function">
<span class="hljs-title">getSourceMap</span> = <span class="hljs-params">(filename)</span> -&gt;</span>
<span class="hljs-keyword">if</span> sourceMaps[filename]?
sourceMaps[filename]</pre></div></div>
</li>
<li id="section-38">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-38">&#182;</a>
</div>
<p>CoffeeScript compiled in a browser may get compiled with <code>options.filename</code>
of <code>&lt;anonymous&gt;</code>, but the browser may request the stack trace with the
filename of the script file.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]?
sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sources[filename]?
answer = compile sources[filename],
filename: filename
sourceMap: <span class="hljs-literal">yes</span>
literate: helpers.isLiterate filename
answer.sourceMap
<span class="hljs-keyword">else</span>
<span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-39">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
</div>
<p>Based on <a href="http://goo.gl/ZTx1p">michaelficarra/CoffeeScriptRedux</a>
NodeJS / V8 have no support for transforming positions in stack traces using
sourceMap, so we must monkey-patch Error to display CoffeeScript source
positions.</p>
</div>
<div class="content"><div class='highlight'><pre>Error.prepareStackTrace = <span class="hljs-function"><span class="hljs-params">(err, stack)</span> -&gt;</span>
<span class="hljs-function"> <span class="hljs-title">getSourceMapping</span> = <span class="hljs-params">(filename, line, column)</span> -&gt;</span>
sourceMap = getSourceMap filename
answer = sourceMap.sourceLocation [line - <span class="hljs-number">1</span>, column - <span class="hljs-number">1</span>] <span class="hljs-keyword">if</span> sourceMap?
<span class="hljs-keyword">if</span> answer? <span class="hljs-keyword">then</span> [answer[<span class="hljs-number">0</span>] + <span class="hljs-number">1</span>, answer[<span class="hljs-number">1</span>] + <span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> <span class="hljs-literal">null</span>
frames = <span class="hljs-keyword">for</span> frame <span class="hljs-keyword">in</span> stack
<span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> frame.getFunction() <span class="hljs-keyword">is</span> exports.run
<span class="hljs-string">" at <span class="hljs-subst">#{formatSourcePosition frame, getSourceMapping}</span>"</span>
<span class="hljs-string">"<span class="hljs-subst">#{err.toString()}</span>\n<span class="hljs-subst">#{frames.join <span class="hljs-string">'\n'</span>}</span>\n"</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,882 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>command.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>command.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>The <code>coffee</code> utility. Handles command-line compilation of CoffeeScript
into various forms: saved into <code>.js</code> files or printed to stdout
or recompiled every time the source is saved,
printed as a token stream or as the syntax tree, or launch an
interactive REPL.</p>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>External dependencies.</p>
</div>
<div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffee-script'</span>
{spawn, exec} = <span class="hljs-built_in">require</span> <span class="hljs-string">'child_process'</span>
{EventEmitter} = <span class="hljs-built_in">require</span> <span class="hljs-string">'events'</span>
useWinPathSep = path.sep <span class="hljs-keyword">is</span> <span class="hljs-string">'\\'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Allow CoffeeScript to emit Node.js events.</p>
</div>
<div class="content"><div class='highlight'><pre>helpers.extend CoffeeScript, <span class="hljs-keyword">new</span> EventEmitter
<span class="hljs-function">
<span class="hljs-title">printLine</span> = <span class="hljs-params">(line)</span> -&gt;</span> process.stdout.write line + <span class="hljs-string">'\n'</span>
<span class="hljs-function"><span class="hljs-title">printWarn</span> = <span class="hljs-params">(line)</span> -&gt;</span> process.stderr.write line + <span class="hljs-string">'\n'</span>
<span class="hljs-function">
<span class="hljs-title">hidden</span> = <span class="hljs-params">(file)</span> -&gt;</span> <span class="hljs-regexp">/^\.|~$/</span>.test file</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>The help banner that is printed in conjunction with <code>-h</code>/<code>--help</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>BANNER = <span class="hljs-string">'''
Usage: coffee [options] path/to/script.coffee -- [args]
If called without options, `coffee` will run your script.
'''</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>The list of all the valid option flags that <code>coffee</code> knows how to handle.</p>
</div>
<div class="content"><div class='highlight'><pre>SWITCHES = [
[<span class="hljs-string">'-b'</span>, <span class="hljs-string">'--bare'</span>, <span class="hljs-string">'compile without a top-level function wrapper'</span>]
[<span class="hljs-string">'-c'</span>, <span class="hljs-string">'--compile'</span>, <span class="hljs-string">'compile to JavaScript and save as .js files'</span>]
[<span class="hljs-string">'-e'</span>, <span class="hljs-string">'--eval'</span>, <span class="hljs-string">'pass a string from the command line as input'</span>]
[<span class="hljs-string">'-h'</span>, <span class="hljs-string">'--help'</span>, <span class="hljs-string">'display this help message'</span>]
[<span class="hljs-string">'-i'</span>, <span class="hljs-string">'--interactive'</span>, <span class="hljs-string">'run an interactive CoffeeScript REPL'</span>]
[<span class="hljs-string">'-j'</span>, <span class="hljs-string">'--join [FILE]'</span>, <span class="hljs-string">'concatenate the source CoffeeScript before compiling'</span>]
[<span class="hljs-string">'-m'</span>, <span class="hljs-string">'--map'</span>, <span class="hljs-string">'generate source map and save as .js.map files'</span>]
[<span class="hljs-string">'-M'</span>, <span class="hljs-string">'--inline-map'</span>, <span class="hljs-string">'generate source map and include it directly in output'</span>]
[<span class="hljs-string">'-n'</span>, <span class="hljs-string">'--nodes'</span>, <span class="hljs-string">'print out the parse tree that the parser produces'</span>]
[ <span class="hljs-string">'--nodejs [ARGS]'</span>, <span class="hljs-string">'pass options directly to the "node" binary'</span>]
[ <span class="hljs-string">'--no-header'</span>, <span class="hljs-string">'suppress the "Generated by" header'</span>]
[<span class="hljs-string">'-o'</span>, <span class="hljs-string">'--output [DIR]'</span>, <span class="hljs-string">'set the output directory for compiled JavaScript'</span>]
[<span class="hljs-string">'-p'</span>, <span class="hljs-string">'--print'</span>, <span class="hljs-string">'print out the compiled JavaScript'</span>]
[<span class="hljs-string">'-r'</span>, <span class="hljs-string">'--require [MODULE*]'</span>, <span class="hljs-string">'require the given module before eval or REPL'</span>]
[<span class="hljs-string">'-s'</span>, <span class="hljs-string">'--stdio'</span>, <span class="hljs-string">'listen for and compile scripts over stdio'</span>]
[<span class="hljs-string">'-l'</span>, <span class="hljs-string">'--literate'</span>, <span class="hljs-string">'treat stdio as literate style coffee-script'</span>]
[<span class="hljs-string">'-t'</span>, <span class="hljs-string">'--tokens'</span>, <span class="hljs-string">'print out the tokens that the lexer/rewriter produce'</span>]
[<span class="hljs-string">'-v'</span>, <span class="hljs-string">'--version'</span>, <span class="hljs-string">'display the version number'</span>]
[<span class="hljs-string">'-w'</span>, <span class="hljs-string">'--watch'</span>, <span class="hljs-string">'watch scripts for changes and rerun commands'</span>]
]</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Top-level objects shared by all the functions.</p>
</div>
<div class="content"><div class='highlight'><pre>opts = {}
sources = []
sourceCode = []
notSources = {}
watchedDirs = {}
optionParser = <span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Run <code>coffee</code> by parsing passed options and determining what action to take.
Many flags cause us to divert before compiling anything. Flags passed after
<code>--</code> will be passed verbatim to your script as arguments in <code>process.argv</code></p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function">-&gt;</span>
parseOptions()</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Make the REPL <em>CLI</em> use the global context so as to (a) be consistent with the
<code>node</code> REPL CLI and, therefore, (b) make packages that modify native prototypes
(such as colors and sugar) work as expected.</p>
</div>
<div class="content"><div class='highlight'><pre> replCliOpts = useGlobal: <span class="hljs-literal">yes</span>
opts.prelude = makePrelude opts.<span class="hljs-built_in">require</span> <span class="hljs-keyword">if</span> opts.<span class="hljs-built_in">require</span>
replCliOpts.prelude = opts.prelude
<span class="hljs-keyword">return</span> forkNode() <span class="hljs-keyword">if</span> opts.nodejs
<span class="hljs-keyword">return</span> usage() <span class="hljs-keyword">if</span> opts.help
<span class="hljs-keyword">return</span> version() <span class="hljs-keyword">if</span> opts.version
<span class="hljs-keyword">return</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">'./repl'</span>).start(replCliOpts) <span class="hljs-keyword">if</span> opts.interactive
<span class="hljs-keyword">return</span> compileStdio() <span class="hljs-keyword">if</span> opts.stdio
<span class="hljs-keyword">return</span> compileScript <span class="hljs-literal">null</span>, opts.arguments[<span class="hljs-number">0</span>] <span class="hljs-keyword">if</span> opts.eval
<span class="hljs-keyword">return</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">'./repl'</span>).start(replCliOpts) <span class="hljs-keyword">unless</span> opts.arguments.length
literals = <span class="hljs-keyword">if</span> opts.run <span class="hljs-keyword">then</span> opts.arguments.splice <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> []
process.argv = process.argv[<span class="hljs-number">0.</span><span class="hljs-number">.1</span>].concat literals
process.argv[<span class="hljs-number">0</span>] = <span class="hljs-string">'coffee'</span>
opts.output = path.resolve opts.output <span class="hljs-keyword">if</span> opts.output
<span class="hljs-keyword">if</span> opts.join
opts.join = path.resolve opts.join
<span class="hljs-built_in">console</span>.error <span class="hljs-string">'''
The --join option is deprecated and will be removed in a future version.
If for some reason it's necessary to share local variables between files,
replace...
$ coffee --compile --join bundle.js -- a.coffee b.coffee c.coffee
with...
$ cat a.coffee b.coffee c.coffee | coffee --compile --stdio &gt; bundle.js
'''</span>
<span class="hljs-keyword">for</span> source <span class="hljs-keyword">in</span> opts.arguments
source = path.resolve source
compilePath source, <span class="hljs-literal">yes</span>, source
<span class="hljs-function">
<span class="hljs-title">makePrelude</span> = <span class="hljs-params">(requires)</span> -&gt;</span>
requires.map (<span class="hljs-built_in">module</span>) -&gt;
[_, name, <span class="hljs-built_in">module</span>] = match <span class="hljs-keyword">if</span> match = <span class="hljs-built_in">module</span>.match(<span class="hljs-regexp">/^(.*)=(.*)$/</span>)
name ||= helpers.baseFileName <span class="hljs-built_in">module</span>, <span class="hljs-literal">yes</span>, useWinPathSep
<span class="hljs-string">"<span class="hljs-subst">#{name}</span> = require('<span class="hljs-subst">#{<span class="hljs-built_in">module</span>}</span>')"</span>
.join <span class="hljs-string">';'</span></pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Compile a path, which could be a script or a directory. If a directory
is passed, recursively compile all .coffee, .litcoffee, and .coffee.md
extension source files in it and all subdirectories.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compilePath</span> = <span class="hljs-params">(source, topLevel, base)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> source <span class="hljs-keyword">in</span> sources <span class="hljs-keyword">or</span>
watchedDirs[source] <span class="hljs-keyword">or</span>
<span class="hljs-keyword">not</span> topLevel <span class="hljs-keyword">and</span> (notSources[source] <span class="hljs-keyword">or</span> hidden source)
<span class="hljs-keyword">try</span>
stats = fs.statSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"File not found: <span class="hljs-subst">#{source}</span>"</span>
process.exit <span class="hljs-number">1</span>
<span class="hljs-keyword">throw</span> err
<span class="hljs-keyword">if</span> stats.isDirectory()
<span class="hljs-keyword">if</span> path.basename(source) <span class="hljs-keyword">is</span> <span class="hljs-string">'node_modules'</span>
notSources[source] = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">return</span>
<span class="hljs-keyword">if</span> opts.run
compilePath findDirectoryIndex(source), topLevel, base
<span class="hljs-keyword">return</span>
watchDir source, base <span class="hljs-keyword">if</span> opts.watch
<span class="hljs-keyword">try</span>
files = fs.readdirSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">return</span> <span class="hljs-keyword">else</span> <span class="hljs-keyword">throw</span> err
<span class="hljs-keyword">for</span> file <span class="hljs-keyword">in</span> files
compilePath (path.join source, file), <span class="hljs-literal">no</span>, base
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> topLevel <span class="hljs-keyword">or</span> helpers.isCoffee source
sources.push source
sourceCode.push <span class="hljs-literal">null</span>
<span class="hljs-keyword">delete</span> notSources[source]
watch source, base <span class="hljs-keyword">if</span> opts.watch
<span class="hljs-keyword">try</span>
code = fs.readFileSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">return</span> <span class="hljs-keyword">else</span> <span class="hljs-keyword">throw</span> err
compileScript(source, code.toString(), base)
<span class="hljs-keyword">else</span>
notSources[source] = <span class="hljs-literal">yes</span>
<span class="hljs-function">
<span class="hljs-title">findDirectoryIndex</span> = <span class="hljs-params">(source)</span> -&gt;</span>
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> CoffeeScript.FILE_EXTENSIONS
index = path.join source, <span class="hljs-string">"index<span class="hljs-subst">#{ext}</span>"</span>
<span class="hljs-keyword">try</span>
<span class="hljs-keyword">return</span> index <span class="hljs-keyword">if</span> (fs.statSync index).isFile()
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"Missing index.coffee or index.litcoffee in <span class="hljs-subst">#{source}</span>"</span>
process.exit <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Compile a single source script, containing the given code, according to the
requested options. If evaluating the script directly sets <code>__filename</code>,
<code>__dirname</code> and <code>module.filename</code> to be correct relative to the scripts path.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileScript</span> = <span class="hljs-params">(file, input, base = <span class="hljs-literal">null</span>)</span> -&gt;</span>
o = opts
options = compileOptions file, base
<span class="hljs-keyword">try</span>
t = task = {file, input, options}
CoffeeScript.emit <span class="hljs-string">'compile'</span>, task
<span class="hljs-keyword">if</span> o.tokens
printTokens CoffeeScript.tokens t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.nodes
printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.run
CoffeeScript.register()
CoffeeScript.eval opts.prelude, t.options <span class="hljs-keyword">if</span> opts.prelude
CoffeeScript.run t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.join <span class="hljs-keyword">and</span> t.file <span class="hljs-keyword">isnt</span> o.join
t.input = helpers.invertLiterate t.input <span class="hljs-keyword">if</span> helpers.isLiterate file
sourceCode[sources.indexOf(t.file)] = t.input
compileJoin()
<span class="hljs-keyword">else</span>
compiled = CoffeeScript.compile t.input, t.options
t.output = compiled
<span class="hljs-keyword">if</span> o.map
t.output = compiled.js
t.sourceMap = compiled.v3SourceMap
CoffeeScript.emit <span class="hljs-string">'success'</span>, task
<span class="hljs-keyword">if</span> o.<span class="hljs-built_in">print</span>
printLine t.output.trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.compile <span class="hljs-keyword">or</span> o.map
writeJs base, t.file, t.output, options.jsPath, t.sourceMap
<span class="hljs-keyword">catch</span> err
CoffeeScript.emit <span class="hljs-string">'failure'</span>, err, task
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> CoffeeScript.listeners(<span class="hljs-string">'failure'</span>).length
message = err?.stack <span class="hljs-keyword">or</span> <span class="hljs-string">"<span class="hljs-subst">#{err}</span>"</span>
<span class="hljs-keyword">if</span> o.watch
printLine message + <span class="hljs-string">'\x07'</span>
<span class="hljs-keyword">else</span>
printWarn message
process.exit <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Attach the appropriate listeners to compile scripts incoming over <strong>stdin</strong>,
and write them back to <strong>stdout</strong>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileStdio</span> = -&gt;</span>
buffers = []
stdin = process.openStdin()
stdin.<span class="hljs-literal">on</span> <span class="hljs-string">'data'</span>, <span class="hljs-function"><span class="hljs-params">(buffer)</span> -&gt;</span>
buffers.push buffer <span class="hljs-keyword">if</span> buffer
stdin.<span class="hljs-literal">on</span> <span class="hljs-string">'end'</span>, <span class="hljs-function">-&gt;</span>
compileScript <span class="hljs-literal">null</span>, Buffer.concat(buffers).toString()</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>If all of the source files are done being read, concatenate and compile
them together.</p>
</div>
<div class="content"><div class='highlight'><pre>joinTimeout = <span class="hljs-literal">null</span>
<span class="hljs-function"><span class="hljs-title">compileJoin</span> = -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> opts.join
<span class="hljs-keyword">unless</span> sourceCode.some(<span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span> code <span class="hljs-keyword">is</span> <span class="hljs-literal">null</span>)
clearTimeout joinTimeout
joinTimeout = wait <span class="hljs-number">100</span>, <span class="hljs-function">-&gt;</span>
compileScript opts.join, sourceCode.join(<span class="hljs-string">'\n'</span>), opts.join</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Watch a source CoffeeScript file using <code>fs.watch</code>, recompiling it every
time the file is updated. May be used in combination with other options,
such as <code>--print</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">watch</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
watcher = <span class="hljs-literal">null</span>
prevStats = <span class="hljs-literal">null</span>
compileTimeout = <span class="hljs-literal">null</span>
<span class="hljs-function">
<span class="hljs-title">watchErr</span> = <span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> source <span class="hljs-keyword">in</span> sources
<span class="hljs-keyword">try</span>
rewatch()
compile()
<span class="hljs-keyword">catch</span>
removeSource source, base
compileJoin()
<span class="hljs-function">
<span class="hljs-title">compile</span> = -&gt;</span>
clearTimeout compileTimeout
compileTimeout = wait <span class="hljs-number">25</span>, <span class="hljs-function">-&gt;</span>
fs.stat source, <span class="hljs-function"><span class="hljs-params">(err, stats)</span> -&gt;</span>
<span class="hljs-keyword">return</span> watchErr err <span class="hljs-keyword">if</span> err
<span class="hljs-keyword">return</span> rewatch() <span class="hljs-keyword">if</span> prevStats <span class="hljs-keyword">and</span>
stats.size <span class="hljs-keyword">is</span> prevStats.size <span class="hljs-keyword">and</span>
stats.mtime.getTime() <span class="hljs-keyword">is</span> prevStats.mtime.getTime()
prevStats = stats
fs.readFile source, <span class="hljs-function"><span class="hljs-params">(err, code)</span> -&gt;</span>
<span class="hljs-keyword">return</span> watchErr err <span class="hljs-keyword">if</span> err
compileScript(source, code.toString(), base)
rewatch()
<span class="hljs-function">
<span class="hljs-title">startWatcher</span> = -&gt;</span>
watcher = fs.watch source
.<span class="hljs-literal">on</span> <span class="hljs-string">'change'</span>, compile
.<span class="hljs-literal">on</span> <span class="hljs-string">'error'</span>, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'EPERM'</span>
removeSource source, base
<span class="hljs-function">
<span class="hljs-title">rewatch</span> = -&gt;</span>
watcher?.close()
startWatcher()
<span class="hljs-keyword">try</span>
startWatcher()
<span class="hljs-keyword">catch</span> err
watchErr err</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Watch a directory of files for new additions.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">watchDir</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
watcher = <span class="hljs-literal">null</span>
readdirTimeout = <span class="hljs-literal">null</span>
<span class="hljs-function">
<span class="hljs-title">startWatcher</span> = -&gt;</span>
watcher = fs.watch source
.<span class="hljs-literal">on</span> <span class="hljs-string">'error'</span>, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'EPERM'</span>
stopWatcher()
.<span class="hljs-literal">on</span> <span class="hljs-string">'change'</span>, <span class="hljs-function">-&gt;</span>
clearTimeout readdirTimeout
readdirTimeout = wait <span class="hljs-number">25</span>, <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">try</span>
files = fs.readdirSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-keyword">return</span> stopWatcher()
<span class="hljs-keyword">for</span> file <span class="hljs-keyword">in</span> files
compilePath (path.join source, file), <span class="hljs-literal">no</span>, base
<span class="hljs-function">
<span class="hljs-title">stopWatcher</span> = -&gt;</span>
watcher.close()
removeSourceDir source, base
watchedDirs[source] = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">try</span>
startWatcher()
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-function">
<span class="hljs-title">removeSourceDir</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
<span class="hljs-keyword">delete</span> watchedDirs[source]
sourcesChanged = <span class="hljs-literal">no</span>
<span class="hljs-keyword">for</span> file <span class="hljs-keyword">in</span> sources <span class="hljs-keyword">when</span> source <span class="hljs-keyword">is</span> path.dirname file
removeSource file, base
sourcesChanged = <span class="hljs-literal">yes</span>
compileJoin() <span class="hljs-keyword">if</span> sourcesChanged</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Remove a file from our source list, and source code cache. Optionally remove
the compiled JS version as well.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">removeSource</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
index = sources.indexOf source
sources.splice index, <span class="hljs-number">1</span>
sourceCode.splice index, <span class="hljs-number">1</span>
<span class="hljs-keyword">unless</span> opts.join
silentUnlink outputPath source, base
silentUnlink outputPath source, base, <span class="hljs-string">'.js.map'</span>
timeLog <span class="hljs-string">"removed <span class="hljs-subst">#{source}</span>"</span>
<span class="hljs-function">
<span class="hljs-title">silentUnlink</span> = <span class="hljs-params">(path)</span> -&gt;</span>
<span class="hljs-keyword">try</span>
fs.unlinkSync path
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">in</span> [<span class="hljs-string">'ENOENT'</span>, <span class="hljs-string">'EPERM'</span>]</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Get the corresponding output JavaScript path for a source file.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">outputPath</span> = <span class="hljs-params">(source, base, extension=<span class="hljs-string">".js"</span>)</span> -&gt;</span>
basename = helpers.baseFileName source, <span class="hljs-literal">yes</span>, useWinPathSep
srcDir = path.dirname source
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> opts.output
dir = srcDir
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> source <span class="hljs-keyword">is</span> base
dir = opts.output
<span class="hljs-keyword">else</span>
dir = path.join opts.output, path.relative base, srcDir
path.join dir, basename + extension</pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Recursively mkdir, like <code>mkdir -p</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">mkdirp</span> = <span class="hljs-params">(dir, fn)</span> -&gt;</span>
mode = <span class="hljs-number">0</span>o777 &amp; ~process.umask()
<span class="hljs-keyword">do</span> mkdirs = <span class="hljs-function"><span class="hljs-params">(p = dir, fn)</span> -&gt;</span>
fs.exists p, <span class="hljs-function"><span class="hljs-params">(exists)</span> -&gt;</span>
<span class="hljs-keyword">if</span> exists
fn()
<span class="hljs-keyword">else</span>
mkdirs path.dirname(p), <span class="hljs-function">-&gt;</span>
fs.mkdir p, mode, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">return</span> fn err <span class="hljs-keyword">if</span> err
fn()</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Write out a JavaScript source file with the compiled code. By default, files
are written out in <code>cwd</code> as <code>.js</code> files with the same name, but the output
directory can be customized with <code>--output</code>.</p>
<p>If <code>generatedSourceMap</code> is provided, this will write a <code>.js.map</code> file into the
same directory as the <code>.js</code> file.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">writeJs</span> = <span class="hljs-params">(base, sourcePath, js, jsPath, generatedSourceMap = <span class="hljs-literal">null</span>)</span> -&gt;</span>
sourceMapPath = outputPath sourcePath, base, <span class="hljs-string">".js.map"</span>
jsDir = path.dirname jsPath
<span class="hljs-function"> <span class="hljs-title">compile</span> = -&gt;</span>
<span class="hljs-keyword">if</span> opts.compile
js = <span class="hljs-string">' '</span> <span class="hljs-keyword">if</span> js.length &lt;= <span class="hljs-number">0</span>
<span class="hljs-keyword">if</span> generatedSourceMap <span class="hljs-keyword">then</span> js = <span class="hljs-string">"<span class="hljs-subst">#{js}</span>\n//# sourceMappingURL=<span class="hljs-subst">#{helpers.baseFileName sourceMapPath, <span class="hljs-literal">no</span>, useWinPathSep}</span>\n"</span>
fs.writeFile jsPath, js, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">if</span> err
printLine err.message
process.exit <span class="hljs-number">1</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> opts.compile <span class="hljs-keyword">and</span> opts.watch
timeLog <span class="hljs-string">"compiled <span class="hljs-subst">#{sourcePath}</span>"</span>
<span class="hljs-keyword">if</span> generatedSourceMap
fs.writeFile sourceMapPath, generatedSourceMap, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">if</span> err
printLine <span class="hljs-string">"Could not write source map: <span class="hljs-subst">#{err.message}</span>"</span>
process.exit <span class="hljs-number">1</span>
fs.exists jsDir, <span class="hljs-function"><span class="hljs-params">(itExists)</span> -&gt;</span>
<span class="hljs-keyword">if</span> itExists <span class="hljs-keyword">then</span> compile() <span class="hljs-keyword">else</span> mkdirp jsDir, compile</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Convenience for cleaner setTimeouts.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">wait</span> = <span class="hljs-params">(milliseconds, func)</span> -&gt;</span> setTimeout func, milliseconds</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>When watching scripts, its useful to log changes with the timestamp.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">timeLog</span> = <span class="hljs-params">(message)</span> -&gt;</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"<span class="hljs-subst">#{(<span class="hljs-keyword">new</span> Date).toLocaleTimeString()}</span> - <span class="hljs-subst">#{message}</span>"</span></pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Pretty-print a stream of tokens, sans location data.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">printTokens</span> = <span class="hljs-params">(tokens)</span> -&gt;</span>
strings = <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens
tag = token[<span class="hljs-number">0</span>]
value = token[<span class="hljs-number">1</span>].toString().replace(<span class="hljs-regexp">/\n/</span>, <span class="hljs-string">'\\n'</span>)
<span class="hljs-string">"[<span class="hljs-subst">#{tag}</span> <span class="hljs-subst">#{value}</span>]"</span>
printLine strings.join(<span class="hljs-string">' '</span>)</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Use the <a href="optparse.html">OptionParser module</a> to extract all options from
<code>process.argv</code> that are specified in <code>SWITCHES</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">parseOptions</span> = -&gt;</span>
optionParser = <span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER
o = opts = optionParser.parse process.argv[<span class="hljs-number">2.</span>.]
o.compile <span class="hljs-keyword">or</span>= !!o.output
o.run = <span class="hljs-keyword">not</span> (o.compile <span class="hljs-keyword">or</span> o.<span class="hljs-built_in">print</span> <span class="hljs-keyword">or</span> o.map)
o.<span class="hljs-built_in">print</span> = !! (o.<span class="hljs-built_in">print</span> <span class="hljs-keyword">or</span> (o.eval <span class="hljs-keyword">or</span> o.stdio <span class="hljs-keyword">and</span> o.compile))</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>The compile-time options to pass to the CoffeeScript compiler.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileOptions</span> = <span class="hljs-params">(filename, base)</span> -&gt;</span>
answer = {
filename
literate: opts.literate <span class="hljs-keyword">or</span> helpers.isLiterate(filename)
bare: opts.bare
header: opts.compile <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> opts[<span class="hljs-string">'no-header'</span>]
sourceMap: opts.map
inlineMap: opts[<span class="hljs-string">'inline-map'</span>]
}
<span class="hljs-keyword">if</span> filename
<span class="hljs-keyword">if</span> base
cwd = process.cwd()
jsPath = outputPath filename, base
jsDir = path.dirname jsPath
answer = helpers.merge answer, {
jsPath
sourceRoot: path.relative jsDir, cwd
sourceFiles: [path.relative cwd, filename]
generatedFile: helpers.baseFileName(jsPath, <span class="hljs-literal">no</span>, useWinPathSep)
}
<span class="hljs-keyword">else</span>
answer = helpers.merge answer,
sourceRoot: <span class="hljs-string">""</span>
sourceFiles: [helpers.baseFileName filename, <span class="hljs-literal">no</span>, useWinPathSep]
generatedFile: helpers.baseFileName(filename, <span class="hljs-literal">yes</span>, useWinPathSep) + <span class="hljs-string">".js"</span>
answer</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Start up a new Node.js instance with the arguments in <code>--nodejs</code> passed to
the <code>node</code> binary, preserving the other options.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">forkNode</span> = -&gt;</span>
nodeArgs = opts.nodejs.split <span class="hljs-regexp">/\s+/</span>
args = process.argv[<span class="hljs-number">1.</span>.]
args.splice args.indexOf(<span class="hljs-string">'--nodejs'</span>), <span class="hljs-number">2</span>
p = spawn process.execPath, nodeArgs.concat(args),
cwd: process.cwd()
env: process.env
stdio: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
p.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span> process.exit code</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Print the <code>--help</code> usage message and exit. Deprecated switches are not
shown.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">usage</span> = -&gt;</span>
printLine (<span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER).help()</pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Print the <code>--version</code> message and exit.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">version</span> = -&gt;</span>
printLine <span class="hljs-string">"CoffeeScript version <span class="hljs-subst">#{CoffeeScript.VERSION}</span>"</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,518 +0,0 @@
/*--------------------- Typography ----------------------------*/
@font-face {
font-family: 'aller-light';
src: url('public/fonts/aller-light.eot');
src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'),
url('public/fonts/aller-light.woff') format('woff'),
url('public/fonts/aller-light.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'aller-bold';
src: url('public/fonts/aller-bold.eot');
src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'),
url('public/fonts/aller-bold.woff') format('woff'),
url('public/fonts/aller-bold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'roboto-black';
src: url('public/fonts/roboto-black.eot');
src: url('public/fonts/roboto-black.eot?#iefix') format('embedded-opentype'),
url('public/fonts/roboto-black.woff') format('woff'),
url('public/fonts/roboto-black.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/*--------------------- Layout ----------------------------*/
html { height: 100%; }
body {
font-family: "aller-light";
font-size: 14px;
line-height: 18px;
color: #30404f;
margin: 0; padding: 0;
height:100%;
}
#container { min-height: 100%; }
a {
color: #000;
}
b, strong {
font-weight: normal;
font-family: "aller-bold";
}
p {
margin: 15px 0 0px;
}
.annotation ul, .annotation ol {
margin: 25px 0;
}
.annotation ul li, .annotation ol li {
font-size: 14px;
line-height: 18px;
margin: 10px 0;
}
h1, h2, h3, h4, h5, h6 {
color: #112233;
line-height: 1em;
font-weight: normal;
font-family: "roboto-black";
text-transform: uppercase;
margin: 30px 0 15px 0;
}
h1 {
margin-top: 40px;
}
h2 {
font-size: 1.26em;
}
hr {
border: 0;
background: 1px #ddd;
height: 1px;
margin: 20px 0;
}
pre, tt, code {
font-size: 12px; line-height: 16px;
font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
margin: 0; padding: 0;
}
.annotation pre {
display: block;
margin: 0;
padding: 7px 10px;
background: #fcfcfc;
-moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
overflow-x: auto;
}
.annotation pre code {
border: 0;
padding: 0;
background: transparent;
}
blockquote {
border-left: 5px solid #ccc;
margin: 0;
padding: 1px 0 1px 1em;
}
.sections blockquote p {
font-family: Menlo, Consolas, Monaco, monospace;
font-size: 12px; line-height: 16px;
color: #999;
margin: 10px 0 0;
white-space: pre-wrap;
}
ul.sections {
list-style: none;
padding:0 0 5px 0;;
margin:0;
}
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
ul.sections > li > div {
-moz-box-sizing: border-box; /* firefox */
-ms-box-sizing: border-box; /* ie */
-webkit-box-sizing: border-box; /* webkit */
-khtml-box-sizing: border-box; /* konqueror */
box-sizing: border-box; /* css3 */
}
/*---------------------- Jump Page -----------------------------*/
#jump_to, #jump_page {
margin: 0;
background: white;
-webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
-webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
font: 16px Arial;
cursor: pointer;
text-align: right;
list-style: none;
}
#jump_to a {
text-decoration: none;
}
#jump_to a.large {
display: none;
}
#jump_to a.small {
font-size: 22px;
font-weight: bold;
color: #676767;
}
#jump_to, #jump_wrapper {
position: fixed;
right: 0; top: 0;
padding: 10px 15px;
margin:0;
}
#jump_wrapper {
display: none;
padding:0;
}
#jump_to:hover #jump_wrapper {
display: block;
}
#jump_page_wrapper{
position: fixed;
right: 0;
top: 0;
bottom: 0;
}
#jump_page {
padding: 5px 0 3px;
margin: 0 0 25px 25px;
max-height: 100%;
overflow: auto;
}
#jump_page .source {
display: block;
padding: 15px;
text-decoration: none;
border-top: 1px solid #eee;
}
#jump_page .source:hover {
background: #f5f5ff;
}
#jump_page .source:first-child {
}
/*---------------------- Low resolutions (> 320px) ---------------------*/
@media only screen and (min-width: 320px) {
.pilwrap { display: none; }
ul.sections > li > div {
display: block;
padding:5px 10px 0 10px;
}
ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
padding-left: 30px;
}
ul.sections > li > div.content {
overflow-x:auto;
-webkit-box-shadow: inset 0 0 5px #e5e5ee;
box-shadow: inset 0 0 5px #e5e5ee;
border: 1px solid #dedede;
margin:5px 10px 5px 10px;
padding-bottom: 5px;
}
ul.sections > li > div.annotation pre {
margin: 7px 0 7px;
padding-left: 15px;
}
ul.sections > li > div.annotation p tt, .annotation code {
background: #f8f8ff;
border: 1px solid #dedede;
font-size: 12px;
padding: 0 0.2em;
}
}
/*---------------------- (> 481px) ---------------------*/
@media only screen and (min-width: 481px) {
#container {
position: relative;
}
body {
background-color: #F5F5FF;
font-size: 15px;
line-height: 21px;
}
pre, tt, code {
line-height: 18px;
}
p, ul, ol {
margin: 0 0 15px;
}
#jump_to {
padding: 5px 10px;
}
#jump_wrapper {
padding: 0;
}
#jump_to, #jump_page {
font: 10px Arial;
text-transform: uppercase;
}
#jump_page .source {
padding: 5px 10px;
}
#jump_to a.large {
display: inline-block;
}
#jump_to a.small {
display: none;
}
#background {
position: absolute;
top: 0; bottom: 0;
width: 350px;
background: #fff;
border-right: 1px solid #e5e5ee;
z-index: -1;
}
ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
padding-left: 40px;
}
ul.sections > li {
white-space: nowrap;
}
ul.sections > li > div {
display: inline-block;
}
ul.sections > li > div.annotation {
max-width: 350px;
min-width: 350px;
min-height: 5px;
padding: 13px;
overflow-x: hidden;
white-space: normal;
vertical-align: top;
text-align: left;
}
ul.sections > li > div.annotation pre {
margin: 15px 0 15px;
padding-left: 15px;
}
ul.sections > li > div.content {
padding: 13px;
vertical-align: top;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.pilwrap {
position: relative;
display: inline;
}
.pilcrow {
font: 12px Arial;
text-decoration: none;
color: #454545;
position: absolute;
top: 3px; left: -20px;
padding: 1px 2px;
opacity: 0;
-webkit-transition: opacity 0.2s linear;
}
.for-h1 .pilcrow {
top: 47px;
}
.for-h2 .pilcrow, .for-h3 .pilcrow, .for-h4 .pilcrow {
top: 35px;
}
ul.sections > li > div.annotation:hover .pilcrow {
opacity: 1;
}
}
/*---------------------- (> 1025px) ---------------------*/
@media only screen and (min-width: 1025px) {
body {
font-size: 16px;
line-height: 24px;
}
#background {
width: 525px;
}
ul.sections > li > div.annotation {
max-width: 525px;
min-width: 525px;
padding: 10px 25px 1px 50px;
}
ul.sections > li > div.content {
padding: 9px 15px 16px 25px;
}
}
/*---------------------- Syntax Highlighting -----------------------------*/
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
pre code {
display: block; padding: 0.5em;
color: #000;
background: #f8f8ff
}
pre .hljs-comment,
pre .hljs-template_comment,
pre .hljs-diff .hljs-header,
pre .hljs-javadoc {
color: #408080;
font-style: italic
}
pre .hljs-keyword,
pre .hljs-assignment,
pre .hljs-literal,
pre .hljs-css .hljs-rule .hljs-keyword,
pre .hljs-winutils,
pre .hljs-javascript .hljs-title,
pre .hljs-lisp .hljs-title,
pre .hljs-subst {
color: #954121;
/*font-weight: bold*/
}
pre .hljs-number,
pre .hljs-hexcolor {
color: #40a070
}
pre .hljs-string,
pre .hljs-tag .hljs-value,
pre .hljs-phpdoc,
pre .hljs-tex .hljs-formula {
color: #219161;
}
pre .hljs-title,
pre .hljs-id {
color: #19469D;
}
pre .hljs-params {
color: #00F;
}
pre .hljs-javascript .hljs-title,
pre .hljs-lisp .hljs-title,
pre .hljs-subst {
font-weight: normal
}
pre .hljs-class .hljs-title,
pre .hljs-haskell .hljs-label,
pre .hljs-tex .hljs-command {
color: #458;
font-weight: bold
}
pre .hljs-tag,
pre .hljs-tag .hljs-title,
pre .hljs-rules .hljs-property,
pre .hljs-django .hljs-tag .hljs-keyword {
color: #000080;
font-weight: normal
}
pre .hljs-attribute,
pre .hljs-variable,
pre .hljs-instancevar,
pre .hljs-lisp .hljs-body {
color: #008080
}
pre .hljs-regexp {
color: #B68
}
pre .hljs-class {
color: #458;
font-weight: bold
}
pre .hljs-symbol,
pre .hljs-ruby .hljs-symbol .hljs-string,
pre .hljs-ruby .hljs-symbol .hljs-keyword,
pre .hljs-ruby .hljs-symbol .hljs-keymethods,
pre .hljs-lisp .hljs-keyword,
pre .hljs-tex .hljs-special,
pre .hljs-input_number {
color: #990073
}
pre .hljs-builtin,
pre .hljs-constructor,
pre .hljs-built_in,
pre .hljs-lisp .hljs-title {
color: #0086b3
}
pre .hljs-preprocessor,
pre .hljs-pi,
pre .hljs-doctype,
pre .hljs-shebang,
pre .hljs-cdata {
color: #999;
font-weight: bold
}
pre .hljs-deletion {
background: #fdd
}
pre .hljs-addition {
background: #dfd
}
pre .hljs-diff .hljs-change {
background: #0086b3
}
pre .hljs-chunk {
color: #aaa
}
pre .hljs-tex .hljs-formula {
opacity: 0.5;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,612 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>helpers.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>helpers.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>This file contains the common helper functions that wed like to share among
the <strong>Lexer</strong>, <strong>Rewriter</strong>, and the <strong>Nodes</strong>. Merge objects, flatten
arrays, count characters, that sort of thing.</p>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Peek at the beginning of a given string to see if it matches a sequence.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.starts = <span class="hljs-function"><span class="hljs-params">(string, literal, start)</span> -&gt;</span>
literal <span class="hljs-keyword">is</span> string.substr start, literal.length</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Peek at the end of a given string to see if it matches a sequence.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.ends = <span class="hljs-function"><span class="hljs-params">(string, literal, back)</span> -&gt;</span>
len = literal.length
literal <span class="hljs-keyword">is</span> string.substr string.length - len - (back <span class="hljs-keyword">or</span> <span class="hljs-number">0</span>), len</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Repeat a string <code>n</code> times.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.repeat = repeat = <span class="hljs-function"><span class="hljs-params">(str, n)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Use clever algorithm to have O(log(n)) string concatenation operations.</p>
</div>
<div class="content"><div class='highlight'><pre> res = <span class="hljs-string">''</span>
<span class="hljs-keyword">while</span> n &gt; <span class="hljs-number">0</span>
res += str <span class="hljs-keyword">if</span> n &amp; <span class="hljs-number">1</span>
n &gt;&gt;&gt;= <span class="hljs-number">1</span>
str += str
res</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Trim out all falsy values from an array.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.compact = <span class="hljs-function"><span class="hljs-params">(array)</span> -&gt;</span>
item <span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> array <span class="hljs-keyword">when</span> item</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Count the number of occurrences of a string in a string.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.count = <span class="hljs-function"><span class="hljs-params">(string, substr)</span> -&gt;</span>
num = pos = <span class="hljs-number">0</span>
<span class="hljs-keyword">return</span> <span class="hljs-number">1</span>/<span class="hljs-number">0</span> <span class="hljs-keyword">unless</span> substr.length
num++ <span class="hljs-keyword">while</span> pos = <span class="hljs-number">1</span> + string.indexOf substr, pos
num</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Merge objects, returning a fresh copy with attributes from both sides.
Used every time <code>Base#compile</code> is called, to allow properties in the
options hash to propagate down the tree without polluting other branches.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.merge = <span class="hljs-function"><span class="hljs-params">(options, overrides)</span> -&gt;</span>
extend (extend {}, options), overrides</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Extend a source object with the properties of another object (shallow copy).</p>
</div>
<div class="content"><div class='highlight'><pre>extend = exports.extend = <span class="hljs-function"><span class="hljs-params">(object, properties)</span> -&gt;</span>
<span class="hljs-keyword">for</span> key, val <span class="hljs-keyword">of</span> properties
object[key] = val
object</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Return a flattened version of an array.
Handy for getting a list of <code>children</code> from the nodes.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.flatten = flatten = <span class="hljs-function"><span class="hljs-params">(array)</span> -&gt;</span>
flattened = []
<span class="hljs-keyword">for</span> element <span class="hljs-keyword">in</span> array
<span class="hljs-keyword">if</span> <span class="hljs-string">'[object Array]'</span> <span class="hljs-keyword">is</span> Object::toString.call element
flattened = flattened.concat flatten element
<span class="hljs-keyword">else</span>
flattened.push element
flattened</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Delete a key from an object, returning the value. Useful when a node is
looking for a particular method in an options hash.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.del = <span class="hljs-function"><span class="hljs-params">(obj, key)</span> -&gt;</span>
val = obj[key]
<span class="hljs-keyword">delete</span> obj[key]
val</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Typical Array::some</p>
</div>
<div class="content"><div class='highlight'><pre>exports.some = Array::some ? (fn) -&gt;
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span> <span class="hljs-keyword">for</span> e <span class="hljs-keyword">in</span> <span class="hljs-keyword">this</span> <span class="hljs-keyword">when</span> fn e
<span class="hljs-literal">false</span></pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Simple function for inverting Literate CoffeeScript code by putting the
documentation in comments, producing a string of CoffeeScript code that
can be compiled “normally”.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.invertLiterate = <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span>
maybe_code = <span class="hljs-literal">true</span>
lines = <span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> code.split(<span class="hljs-string">'\n'</span>)
<span class="hljs-keyword">if</span> maybe_code <span class="hljs-keyword">and</span> <span class="hljs-regexp">/^([ ]{4}|[ ]{0,3}\t)/</span>.test line
line
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> maybe_code = <span class="hljs-regexp">/^\s*$/</span>.test line
line
<span class="hljs-keyword">else</span>
<span class="hljs-string">'# '</span> + line
lines.join <span class="hljs-string">'\n'</span></pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Merge two jison-style location data objects together.
If <code>last</code> is not provided, this will simply return <code>first</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildLocationData</span> = <span class="hljs-params">(first, last)</span> -&gt;</span>
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> last
first
<span class="hljs-keyword">else</span>
first_line: first.first_line
first_column: first.first_column
last_line: last.last_line
last_column: last.last_column</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>This returns a function which takes an object as a parameter, and if that
object is an AST node, updates that objects locationData.
The object is returned either way.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.addLocationDataFn = <span class="hljs-function"><span class="hljs-params">(first, last)</span> -&gt;</span>
(obj) -&gt;
<span class="hljs-keyword">if</span> ((<span class="hljs-keyword">typeof</span> obj) <span class="hljs-keyword">is</span> <span class="hljs-string">'object'</span>) <span class="hljs-keyword">and</span> (!!obj[<span class="hljs-string">'updateLocationDataIfMissing'</span>])
obj.updateLocationDataIfMissing buildLocationData(first, last)
<span class="hljs-keyword">return</span> obj</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Convert jison location data to a string.
<code>obj</code> can be a token, or a locationData.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.locationDataToString = <span class="hljs-function"><span class="hljs-params">(obj)</span> -&gt;</span>
<span class="hljs-keyword">if</span> (<span class="hljs-string">"2"</span> <span class="hljs-keyword">of</span> obj) <span class="hljs-keyword">and</span> (<span class="hljs-string">"first_line"</span> <span class="hljs-keyword">of</span> obj[<span class="hljs-number">2</span>]) <span class="hljs-keyword">then</span> locationData = obj[<span class="hljs-number">2</span>]
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> <span class="hljs-string">"first_line"</span> <span class="hljs-keyword">of</span> obj <span class="hljs-keyword">then</span> locationData = obj
<span class="hljs-keyword">if</span> locationData
<span class="hljs-string">"<span class="hljs-subst">#{locationData.first_line + <span class="hljs-number">1</span>}</span>:<span class="hljs-subst">#{locationData.first_column + <span class="hljs-number">1</span>}</span>-"</span> +
<span class="hljs-string">"<span class="hljs-subst">#{locationData.last_line + <span class="hljs-number">1</span>}</span>:<span class="hljs-subst">#{locationData.last_column + <span class="hljs-number">1</span>}</span>"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"No location data"</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>A <code>.coffee.md</code> compatible version of <code>basename</code>, that returns the file sans-extension.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.baseFileName = <span class="hljs-function"><span class="hljs-params">(file, stripExt = <span class="hljs-literal">no</span>, useWinPathSep = <span class="hljs-literal">no</span>)</span> -&gt;</span>
pathSep = <span class="hljs-keyword">if</span> useWinPathSep <span class="hljs-keyword">then</span> <span class="hljs-regexp">/\\|\//</span> <span class="hljs-keyword">else</span> <span class="hljs-regexp">/\//</span>
parts = file.split(pathSep)
file = parts[parts.length - <span class="hljs-number">1</span>]
<span class="hljs-keyword">return</span> file <span class="hljs-keyword">unless</span> stripExt <span class="hljs-keyword">and</span> file.indexOf(<span class="hljs-string">'.'</span>) &gt;= <span class="hljs-number">0</span>
parts = file.split(<span class="hljs-string">'.'</span>)
parts.pop()
parts.pop() <span class="hljs-keyword">if</span> parts[parts.length - <span class="hljs-number">1</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'coffee'</span> <span class="hljs-keyword">and</span> parts.length &gt; <span class="hljs-number">1</span>
parts.join(<span class="hljs-string">'.'</span>)</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Determine if a filename represents a CoffeeScript file.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.isCoffee = <span class="hljs-function"><span class="hljs-params">(file)</span> -&gt;</span> <span class="hljs-regexp">/\.((lit)?coffee|coffee\.md)$/</span>.test file</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Determine if a filename represents a Literate CoffeeScript file.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.isLiterate = <span class="hljs-function"><span class="hljs-params">(file)</span> -&gt;</span> <span class="hljs-regexp">/\.(litcoffee|coffee\.md)$/</span>.test file</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Throws a SyntaxError from a given location.
The errors <code>toString</code> will return an error message following the “standard”
format <code>&lt;filename&gt;:&lt;line&gt;:&lt;col&gt;: &lt;message&gt;</code> plus the line with the error and a
marker showing where the error is.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.throwSyntaxError = <span class="hljs-function"><span class="hljs-params">(message, location)</span> -&gt;</span>
error = <span class="hljs-keyword">new</span> SyntaxError message
error.location = location
error.toString = syntaxErrorToString</pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Instead of showing the compilers stacktrace, show our custom error message
(this is useful when the error bubbles up in Node.js applications that
compile CoffeeScript for example).</p>
</div>
<div class="content"><div class='highlight'><pre> error.stack = error.toString()
<span class="hljs-keyword">throw</span> error</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Update a compiler SyntaxError with source code information if it didnt have
it already.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.updateSyntaxError = <span class="hljs-function"><span class="hljs-params">(error, code, filename)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Avoid screwing up the <code>stack</code> property of other errors (i.e. possible bugs).</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> error.toString <span class="hljs-keyword">is</span> syntaxErrorToString
error.code <span class="hljs-keyword">or</span>= code
error.filename <span class="hljs-keyword">or</span>= filename
error.stack = error.toString()
error
<span class="hljs-function">
<span class="hljs-title">syntaxErrorToString</span> = -&gt;</span>
<span class="hljs-keyword">return</span> Error::toString.call @ <span class="hljs-keyword">unless</span> @code <span class="hljs-keyword">and</span> @location
{first_line, first_column, last_line, last_column} = @location
last_line ?= first_line
last_column ?= first_column
filename = @filename <span class="hljs-keyword">or</span> <span class="hljs-string">'[stdin]'</span>
codeLine = @code.split(<span class="hljs-string">'\n'</span>)[first_line]
start = first_column</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Show only the first line on multi-line errors.</p>
</div>
<div class="content"><div class='highlight'><pre> end = <span class="hljs-keyword">if</span> first_line <span class="hljs-keyword">is</span> last_line <span class="hljs-keyword">then</span> last_column + <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> codeLine.length
marker = codeLine[...start].replace(<span class="hljs-regexp">/[^\s]/g</span>, <span class="hljs-string">' '</span>) + repeat(<span class="hljs-string">'^'</span>, end - start)</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Check to see if were running on a color-enabled TTY.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> process?
colorsEnabled = process.stdout?.isTTY <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> process.env?.NODE_DISABLE_COLORS
<span class="hljs-keyword">if</span> @colorful ? colorsEnabled
<span class="hljs-function"> <span class="hljs-title">colorize</span> = <span class="hljs-params">(str)</span> -&gt;</span> <span class="hljs-string">"\x1B[1;31m<span class="hljs-subst">#{str}</span>\x1B[0m"</span>
codeLine = codeLine[...start] + colorize(codeLine[start...end]) + codeLine[end..]
marker = colorize marker
<span class="hljs-string">"""
<span class="hljs-subst">#{filename}</span>:<span class="hljs-subst">#{first_line + <span class="hljs-number">1</span>}</span>:<span class="hljs-subst">#{first_column + <span class="hljs-number">1</span>}</span>: error: <span class="hljs-subst">#{@message}</span>
<span class="hljs-subst">#{codeLine}</span>
<span class="hljs-subst">#{marker}</span>
"""</span>
exports.nameWhitespaceCharacter = <span class="hljs-function"><span class="hljs-params">(string)</span> -&gt;</span>
<span class="hljs-keyword">switch</span> string
<span class="hljs-keyword">when</span> <span class="hljs-string">' '</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'space'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'\n'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'newline'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'\r'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'carriage return'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'\t'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'tab'</span>
<span class="hljs-keyword">else</span> string</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,129 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>index.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>index.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>Loader for CoffeeScript as a Node.js library.</p>
</div>
<div class="content"><div class='highlight'><pre>exports[key] = val <span class="hljs-keyword">for</span> key, val <span class="hljs-keyword">of</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffee-script'</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,366 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>optparse.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>optparse.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>{repeat} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>A simple <strong>OptionParser</strong> class to parse option flags from the command-line.
Use it like so:</p>
<pre><code>parser = <span class="hljs-keyword">new</span> OptionParser switches, helpBanner
options = parser.parse process.argv
</code></pre><p>The first non-option is considered to be the start of the file (and file
option) list, and all subsequent arguments are left unparsed.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.OptionParser = <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OptionParser</span></span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Initialize with a list of valid options, in the form:</p>
<pre><code>[short-flag, long-flag, description]
</code></pre><p>Along with an optional banner for the usage help.</p>
</div>
<div class="content"><div class='highlight'><pre> constructor: <span class="hljs-function"><span class="hljs-params">(rules, @banner)</span> -&gt;</span>
@rules = buildRules rules</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Parse the list of arguments, populating an <code>options</code> object with all of the
specified options, and return it. Options after the first non-option
argument are treated as arguments. <code>options.arguments</code> will be an array
containing the remaining arguments. This is a simpler API than many option
parsers that allow you to attach callback actions for every flag. Instead,
youre responsible for interpreting the options object.</p>
</div>
<div class="content"><div class='highlight'><pre> parse: <span class="hljs-function"><span class="hljs-params">(args)</span> -&gt;</span>
options = arguments: []
skippingArgument = <span class="hljs-literal">no</span>
originalArgs = args
args = normalizeArguments args
<span class="hljs-keyword">for</span> arg, i <span class="hljs-keyword">in</span> args
<span class="hljs-keyword">if</span> skippingArgument
skippingArgument = <span class="hljs-literal">no</span>
<span class="hljs-keyword">continue</span>
<span class="hljs-keyword">if</span> arg <span class="hljs-keyword">is</span> <span class="hljs-string">'--'</span>
pos = originalArgs.indexOf <span class="hljs-string">'--'</span>
options.arguments = options.arguments.concat originalArgs[(pos + <span class="hljs-number">1</span>)..]
<span class="hljs-keyword">break</span>
isOption = !!(arg.match(LONG_FLAG) <span class="hljs-keyword">or</span> arg.match(SHORT_FLAG))</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>the CS option parser is a little odd; options after the first
non-option argument are treated as non-option arguments themselves</p>
</div>
<div class="content"><div class='highlight'><pre> seenNonOptionArg = options.arguments.length &gt; <span class="hljs-number">0</span>
<span class="hljs-keyword">unless</span> seenNonOptionArg
matchedRule = <span class="hljs-literal">no</span>
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules
<span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">is</span> arg <span class="hljs-keyword">or</span> rule.longFlag <span class="hljs-keyword">is</span> arg
value = <span class="hljs-literal">true</span>
<span class="hljs-keyword">if</span> rule.hasArgument
skippingArgument = <span class="hljs-literal">yes</span>
value = args[i + <span class="hljs-number">1</span>]
options[rule.name] = <span class="hljs-keyword">if</span> rule.isList <span class="hljs-keyword">then</span> (options[rule.name] <span class="hljs-keyword">or</span> []).concat value <span class="hljs-keyword">else</span> value
matchedRule = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">break</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"unrecognized option: <span class="hljs-subst">#{arg}</span>"</span> <span class="hljs-keyword">if</span> isOption <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> matchedRule
<span class="hljs-keyword">if</span> seenNonOptionArg <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> isOption
options.arguments.push arg
options</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Return the help text for this <strong>OptionParser</strong>, listing and describing all
of the valid options, for <code>--help</code> and such.</p>
</div>
<div class="content"><div class='highlight'><pre> help: <span class="hljs-function">-&gt;</span>
lines = []
lines.unshift <span class="hljs-string">"<span class="hljs-subst">#{@banner}</span>\n"</span> <span class="hljs-keyword">if</span> @banner
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules
spaces = <span class="hljs-number">15</span> - rule.longFlag.length
spaces = <span class="hljs-keyword">if</span> spaces &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> repeat <span class="hljs-string">' '</span>, spaces <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
letPart = <span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">then</span> rule.shortFlag + <span class="hljs-string">', '</span> <span class="hljs-keyword">else</span> <span class="hljs-string">' '</span>
lines.push <span class="hljs-string">' '</span> + letPart + rule.longFlag + spaces + rule.description
<span class="hljs-string">"\n<span class="hljs-subst">#{ lines.join(<span class="hljs-string">'\n'</span>) }</span>\n"</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<h2 id="helpers">Helpers</h2>
</div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
</div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Regex matchers for option flags.</p>
</div>
<div class="content"><div class='highlight'><pre>LONG_FLAG = <span class="hljs-regexp">/^(--\w[\w\-]*)/</span>
SHORT_FLAG = <span class="hljs-regexp">/^(-\w)$/</span>
MULTI_FLAG = <span class="hljs-regexp">/^-(\w{2,})/</span>
OPTIONAL = <span class="hljs-regexp">/\[(\w+(\*?))\]/</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Build and return the list of option rules. If the optional <em>short-flag</em> is
unspecified, leave it out by padding with <code>null</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRules</span> = <span class="hljs-params">(rules)</span> -&gt;</span>
<span class="hljs-keyword">for</span> tuple <span class="hljs-keyword">in</span> rules
tuple.unshift <span class="hljs-literal">null</span> <span class="hljs-keyword">if</span> tuple.length &lt; <span class="hljs-number">3</span>
buildRule tuple...</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Build a rule from a <code>-o</code> short flag, a <code>--output [DIR]</code> long flag, and the
description of what the option does.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRule</span> = <span class="hljs-params">(shortFlag, longFlag, description, options = {})</span> -&gt;</span>
match = longFlag.match(OPTIONAL)
longFlag = longFlag.match(LONG_FLAG)[<span class="hljs-number">1</span>]
{
name: longFlag.substr <span class="hljs-number">2</span>
shortFlag: shortFlag
longFlag: longFlag
description: description
hasArgument: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">1</span>])
isList: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">2</span>])
}</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Normalize arguments by expanding merged flags into multiple flags. This allows
you to have <code>-wl</code> be the same as <code>--watch --lint</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">normalizeArguments</span> = <span class="hljs-params">(args)</span> -&gt;</span>
args = args[..]
result = []
<span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> args
<span class="hljs-keyword">if</span> match = arg.match MULTI_FLAG
result.push <span class="hljs-string">'-'</span> + l <span class="hljs-keyword">for</span> l <span class="hljs-keyword">in</span> match[<span class="hljs-number">1</span>].split <span class="hljs-string">''</span>
<span class="hljs-keyword">else</span>
result.push arg
result</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,375 +0,0 @@
/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
/*
* Corrects `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
}
/*
* Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/*
* Addresses styling for `hidden` attribute not present in IE 8/9.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/*
* 1. Sets default font family to sans-serif.
* 2. Prevents iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/*
* Removes default margin.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/*
* Addresses `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/*
* Improves readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/*
* Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
* Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
}
/*
* Addresses styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/*
* Addresses styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/*
* Addresses styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/*
* Corrects font family set oddly in Safari 5 and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/*
* Improves readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* Sets consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/*
* Addresses inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/*
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/*
* Removes border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/*
* Corrects overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/*
* Addresses margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/*
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/*
* 1. Corrects font family not being inherited in all browsers.
* 2. Corrects font size not being inherited in all browsers.
* 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
*/
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
/*
* Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/*
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/*
* Re-set default cursor for disabled elements.
*/
button[disabled],
input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to `content-box` in IE 8/9.
* 2. Removes excess padding in IE 8/9.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/*
* Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
* Removes inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE 8/9.
* 2. Improves readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/*
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@@ -1,251 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>register.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>register.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffee-script'</span>
child_process = <span class="hljs-built_in">require</span> <span class="hljs-string">'child_process'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Load and run a CoffeeScript file for Node, stripping any <code>BOM</code>s.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">loadFile</span> = <span class="hljs-params">(<span class="hljs-built_in">module</span>, filename)</span> -&gt;</span>
answer = CoffeeScript._compileFile filename, <span class="hljs-literal">no</span>, <span class="hljs-literal">yes</span>
<span class="hljs-built_in">module</span>._compile answer, filename</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>If the installed version of Node supports <code>require.extensions</code>, register
CoffeeScript as an extension.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">require</span>.extensions
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> CoffeeScript.FILE_EXTENSIONS
<span class="hljs-built_in">require</span>.extensions[ext] = loadFile</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Patch Nodes module loader to be able to handle multi-dot extensions.
This is a horrible thing that should not be required.</p>
</div>
<div class="content"><div class='highlight'><pre> Module = <span class="hljs-built_in">require</span> <span class="hljs-string">'module'</span>
<span class="hljs-function">
<span class="hljs-title">findExtension</span> = <span class="hljs-params">(filename)</span> -&gt;</span>
extensions = path.basename(filename).split <span class="hljs-string">'.'</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Remove the initial dot from dotfiles.</p>
</div>
<div class="content"><div class='highlight'><pre> extensions.shift() <span class="hljs-keyword">if</span> extensions[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">''</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Start with the longest possible extension and work our way shortwards.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> extensions.shift()
curExtension = <span class="hljs-string">'.'</span> + extensions.join <span class="hljs-string">'.'</span>
<span class="hljs-keyword">return</span> curExtension <span class="hljs-keyword">if</span> Module._extensions[curExtension]
<span class="hljs-string">'.js'</span>
Module::load = <span class="hljs-function"><span class="hljs-params">(filename)</span> -&gt;</span>
@filename = filename
@paths = Module._nodeModulePaths path.dirname filename
extension = findExtension filename
Module._extensions[extension](<span class="hljs-keyword">this</span>, filename)
@loaded = <span class="hljs-literal">true</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>If were on Node, patch <code>child_process.fork</code> so that Coffee scripts are able
to fork both CoffeeScript files, and JavaScript files, directly.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> child_process
{fork} = child_process
binary = <span class="hljs-built_in">require</span>.resolve <span class="hljs-string">'../../bin/coffee'</span>
child_process.fork = <span class="hljs-function"><span class="hljs-params">(path, args, options)</span> -&gt;</span>
<span class="hljs-keyword">if</span> helpers.isCoffee path
<span class="hljs-keyword">unless</span> Array.isArray args
options = args <span class="hljs-keyword">or</span> {}
args = []
args = [path].concat args
path = binary
fork path, args, options</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,624 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>repl.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>repl.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
nodeREPL = <span class="hljs-built_in">require</span> <span class="hljs-string">'repl'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffee-script'</span>
{merge, updateSyntaxError} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
replDefaults =
prompt: <span class="hljs-string">'coffee&gt; '</span>,
historyFile: path.join process.env.HOME, <span class="hljs-string">'.coffee_history'</span> <span class="hljs-keyword">if</span> process.env.HOME
historyMaxInputSize: <span class="hljs-number">10240</span>
eval: <span class="hljs-function"><span class="hljs-params">(input, context, filename, cb)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>XXX: multiline hack.</p>
</div>
<div class="content"><div class='highlight'><pre> input = input.replace <span class="hljs-regexp">/\uFF00/g</span>, <span class="hljs-string">'\n'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Nodes REPL sends the input ending with a newline and then wrapped in
parens. Unwrap all that.</p>
</div>
<div class="content"><div class='highlight'><pre> input = input.replace <span class="hljs-regexp">/^\(([\s\S]*)\n\)$/m</span>, <span class="hljs-string">'$1'</span></pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Nodes REPL v6.9.1+ sends the input wrapped in a try/catch statement.
Unwrap that too.</p>
</div>
<div class="content"><div class='highlight'><pre> input = input.replace <span class="hljs-regexp">/^\s*try\s*{([\s\S]*)}\s*catch.*$/m</span>, <span class="hljs-string">'$1'</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Require AST nodes to do some AST manipulation.</p>
</div>
<div class="content"><div class='highlight'><pre> {Block, Assign, Value, Literal} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./nodes'</span>
<span class="hljs-keyword">try</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Tokenize the clean input.</p>
</div>
<div class="content"><div class='highlight'><pre> tokens = CoffeeScript.tokens input</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Collect referenced variable names just like in <code>CoffeeScript.compile</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> referencedVars = (
token[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">when</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>
)</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Generate the AST of the tokens.</p>
</div>
<div class="content"><div class='highlight'><pre> ast = CoffeeScript.nodes tokens</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Add assignment to <code>_</code> variable to force the input to be an expression.</p>
</div>
<div class="content"><div class='highlight'><pre> ast = <span class="hljs-keyword">new</span> Block [
<span class="hljs-keyword">new</span> Assign (<span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> Literal <span class="hljs-string">'_'</span>), ast, <span class="hljs-string">'='</span>
]
js = ast.compile {bare: <span class="hljs-literal">yes</span>, locals: Object.keys(context), referencedVars}
cb <span class="hljs-literal">null</span>, runInContext js, context, filename
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>ASTs <code>compile</code> does not add source code information to syntax errors.</p>
</div>
<div class="content"><div class='highlight'><pre> updateSyntaxError err, input
cb err
<span class="hljs-function">
<span class="hljs-title">runInContext</span> = <span class="hljs-params">(js, context, filename)</span> -&gt;</span>
<span class="hljs-keyword">if</span> context <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js, filename
<span class="hljs-keyword">else</span>
vm.runInContext js, context, filename
<span class="hljs-function">
<span class="hljs-title">addMultilineHandler</span> = <span class="hljs-params">(repl)</span> -&gt;</span>
{rli, inputStream, outputStream} = repl</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Node 0.11.12 changed API, prompt is now _prompt.</p>
</div>
<div class="content"><div class='highlight'><pre> origPrompt = repl._prompt ? repl.prompt
multiline =
enabled: <span class="hljs-literal">off</span>
initialPrompt: origPrompt.replace <span class="hljs-regexp">/^[^&gt; ]*/</span>, <span class="hljs-function"><span class="hljs-params">(x)</span> -&gt;</span> x.replace <span class="hljs-regexp">/./g</span>, <span class="hljs-string">'-'</span>
prompt: origPrompt.replace <span class="hljs-regexp">/^[^&gt; ]*&gt;?/</span>, <span class="hljs-function"><span class="hljs-params">(x)</span> -&gt;</span> x.replace <span class="hljs-regexp">/./g</span>, <span class="hljs-string">'.'</span>
buffer: <span class="hljs-string">''</span></pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Proxy nodes line listener</p>
</div>
<div class="content"><div class='highlight'><pre> nodeLineListener = rli.listeners(<span class="hljs-string">'line'</span>)[<span class="hljs-number">0</span>]
rli.removeListener <span class="hljs-string">'line'</span>, nodeLineListener
rli.<span class="hljs-literal">on</span> <span class="hljs-string">'line'</span>, <span class="hljs-function"><span class="hljs-params">(cmd)</span> -&gt;</span>
<span class="hljs-keyword">if</span> multiline.enabled
multiline.buffer += <span class="hljs-string">"<span class="hljs-subst">#{cmd}</span>\n"</span>
rli.setPrompt multiline.prompt
rli.prompt <span class="hljs-literal">true</span>
<span class="hljs-keyword">else</span>
rli.setPrompt origPrompt
nodeLineListener cmd
<span class="hljs-keyword">return</span></pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Handle Ctrl-v</p>
</div>
<div class="content"><div class='highlight'><pre> inputStream.<span class="hljs-literal">on</span> <span class="hljs-string">'keypress'</span>, <span class="hljs-function"><span class="hljs-params">(char, key)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> key <span class="hljs-keyword">and</span> key.ctrl <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> key.meta <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> key.shift <span class="hljs-keyword">and</span> key.name <span class="hljs-keyword">is</span> <span class="hljs-string">'v'</span>
<span class="hljs-keyword">if</span> multiline.enabled</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>allow arbitrarily switching between modes any time before multiple lines are entered</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> multiline.buffer.match <span class="hljs-regexp">/\n/</span>
multiline.enabled = <span class="hljs-keyword">not</span> multiline.enabled
rli.setPrompt origPrompt
rli.prompt <span class="hljs-literal">true</span>
<span class="hljs-keyword">return</span></pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>no-op unless the current line is empty</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> rli.line? <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> rli.line.match <span class="hljs-regexp">/^\s*$/</span></pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>eval, print, loop</p>
</div>
<div class="content"><div class='highlight'><pre> multiline.enabled = <span class="hljs-keyword">not</span> multiline.enabled
rli.line = <span class="hljs-string">''</span>
rli.cursor = <span class="hljs-number">0</span>
rli.output.cursorTo <span class="hljs-number">0</span>
rli.output.clearLine <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>XXX: multiline hack</p>
</div>
<div class="content"><div class='highlight'><pre> multiline.buffer = multiline.buffer.replace <span class="hljs-regexp">/\n/g</span>, <span class="hljs-string">'\uFF00'</span>
rli.emit <span class="hljs-string">'line'</span>, multiline.buffer
multiline.buffer = <span class="hljs-string">''</span>
<span class="hljs-keyword">else</span>
multiline.enabled = <span class="hljs-keyword">not</span> multiline.enabled
rli.setPrompt multiline.initialPrompt
rli.prompt <span class="hljs-literal">true</span>
<span class="hljs-keyword">return</span></pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Store and load command history from a file</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">addHistory</span> = <span class="hljs-params">(repl, filename, maxSize)</span> -&gt;</span>
lastLine = <span class="hljs-literal">null</span>
<span class="hljs-keyword">try</span></pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Get file info and at most maxSize of command history</p>
</div>
<div class="content"><div class='highlight'><pre> stat = fs.statSync filename
size = Math.min maxSize, stat.size</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Read last <code>size</code> bytes from the file</p>
</div>
<div class="content"><div class='highlight'><pre> readFd = fs.openSync filename, <span class="hljs-string">'r'</span>
buffer = <span class="hljs-keyword">new</span> Buffer(size)
fs.readSync readFd, buffer, <span class="hljs-number">0</span>, size, stat.size - size
fs.closeSync readFd</pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Set the history on the interpreter</p>
</div>
<div class="content"><div class='highlight'><pre> repl.rli.history = buffer.toString().split(<span class="hljs-string">'\n'</span>).reverse()</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>If the history file was truncated we should pop off a potential partial line</p>
</div>
<div class="content"><div class='highlight'><pre> repl.rli.history.pop() <span class="hljs-keyword">if</span> stat.size &gt; maxSize</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Shift off the final blank newline</p>
</div>
<div class="content"><div class='highlight'><pre> repl.rli.history.shift() <span class="hljs-keyword">if</span> repl.rli.history[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">''</span>
repl.rli.historyIndex = <span class="hljs-number">-1</span>
lastLine = repl.rli.history[<span class="hljs-number">0</span>]
fd = fs.openSync filename, <span class="hljs-string">'a'</span>
repl.rli.addListener <span class="hljs-string">'line'</span>, <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span>
<span class="hljs-keyword">if</span> code <span class="hljs-keyword">and</span> code.length <span class="hljs-keyword">and</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'.history'</span> <span class="hljs-keyword">and</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'.exit'</span> <span class="hljs-keyword">and</span> lastLine <span class="hljs-keyword">isnt</span> code</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Save the latest command in the file</p>
</div>
<div class="content"><div class='highlight'><pre> fs.writeSync fd, <span class="hljs-string">"<span class="hljs-subst">#{code}</span>\n"</span>
lastLine = code
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function">-&gt;</span> fs.closeSync fd</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Add a command to show the history stack</p>
</div>
<div class="content"><div class='highlight'><pre> repl.commands[getCommandId(repl, <span class="hljs-string">'history'</span>)] =
help: <span class="hljs-string">'Show command history'</span>
action: <span class="hljs-function">-&gt;</span>
repl.outputStream.write <span class="hljs-string">"<span class="hljs-subst">#{repl.rli.history[..].reverse().join <span class="hljs-string">'\n'</span>}</span>\n"</span>
repl.displayPrompt()
<span class="hljs-function">
<span class="hljs-title">getCommandId</span> = <span class="hljs-params">(repl, commandName)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Node 0.11 changed API, a command such as .help is now stored as help</p>
</div>
<div class="content"><div class='highlight'><pre> commandsHaveLeadingDot = repl.commands[<span class="hljs-string">'.help'</span>]?
<span class="hljs-keyword">if</span> commandsHaveLeadingDot <span class="hljs-keyword">then</span> <span class="hljs-string">".<span class="hljs-subst">#{commandName}</span>"</span> <span class="hljs-keyword">else</span> commandName
<span class="hljs-built_in">module</span>.exports =
start: <span class="hljs-function"><span class="hljs-params">(opts = {})</span> -&gt;</span>
[major, minor, build] = process.versions.node.split(<span class="hljs-string">'.'</span>).map (n) -&gt; parseInt(n)
<span class="hljs-keyword">if</span> major <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> minor &lt; <span class="hljs-number">8</span>
<span class="hljs-built_in">console</span>.warn <span class="hljs-string">"Node 0.8.0+ required for CoffeeScript REPL"</span>
process.exit <span class="hljs-number">1</span>
CoffeeScript.register()
process.argv = [<span class="hljs-string">'coffee'</span>].concat process.argv[<span class="hljs-number">2.</span>.]
opts = merge replDefaults, opts
repl = nodeREPL.start opts
runInContext opts.prelude, repl.context, <span class="hljs-string">'prelude'</span> <span class="hljs-keyword">if</span> opts.prelude
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function">-&gt;</span> repl.outputStream.write <span class="hljs-string">'\n'</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> repl.rli.closed
addMultilineHandler repl
addHistory repl, opts.historyFile, opts.historyMaxInputSize <span class="hljs-keyword">if</span> opts.historyFile</pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Adapt help inherited from the node REPL</p>
</div>
<div class="content"><div class='highlight'><pre> repl.commands[getCommandId(repl, <span class="hljs-string">'load'</span>)].help = <span class="hljs-string">'Load code from a file into this REPL session'</span>
repl</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,398 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>scope.litcoffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>scope.litcoffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>The <strong>Scope</strong> class regulates lexical scoping within CoffeeScript. As you
generate code, you create a tree of scopes in the same shape as the nested
function bodies. Each scope knows about the variables declared within it,
and has a reference to its parent enclosing scope. In this way, we know which
variables are new and need to be declared with <code>var</code>, and which are shared
with external scopes.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.Scope = <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Scope</span></span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Initialize a scope with its parent, for lookups up the chain,
as well as a reference to the <strong>Block</strong> node it belongs to, which is
where it should declare its variables, a reference to the function that
it belongs to, and a list of variables referenced in the source code
and therefore should be avoided when generating variables.</p>
</div>
<div class="content"><div class='highlight'><pre> constructor: <span class="hljs-function"><span class="hljs-params">(@parent, @expressions, @method, @referencedVars)</span> -&gt;</span>
@variables = [{name: <span class="hljs-string">'arguments'</span>, type: <span class="hljs-string">'arguments'</span>}]
@positions = {}
@utilities = {} <span class="hljs-keyword">unless</span> @parent</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>The <code>@root</code> is the top-level <strong>Scope</strong> object for a given file.</p>
</div>
<div class="content"><div class='highlight'><pre> @root = @parent?.root ? <span class="hljs-keyword">this</span></pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Adds a new variable or overrides an existing one.</p>
</div>
<div class="content"><div class='highlight'><pre> add: <span class="hljs-function"><span class="hljs-params">(name, type, immediate)</span> -&gt;</span>
<span class="hljs-keyword">return</span> @parent.add name, type, immediate <span class="hljs-keyword">if</span> @shared <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> immediate
<span class="hljs-keyword">if</span> Object::hasOwnProperty.call @positions, name
@variables[@positions[name]].type = type
<span class="hljs-keyword">else</span>
@positions[name] = @variables.push({name, type}) - <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>When <code>super</code> is called, we need to find the name of the current method were
in, so that we know how to invoke the same method of the parent class. This
can get complicated if super is being called from an inner function.
<code>namedMethod</code> will walk up the scope tree until it either finds the first
function object that has a name filled in, or bottoms out.</p>
</div>
<div class="content"><div class='highlight'><pre> namedMethod: <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">return</span> @method <span class="hljs-keyword">if</span> @method?.name <span class="hljs-keyword">or</span> !@parent
@parent.namedMethod()</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Look up a variable name in lexical scope, and declare it if it does not
already exist.</p>
</div>
<div class="content"><div class='highlight'><pre> find: <span class="hljs-function"><span class="hljs-params">(name, type = <span class="hljs-string">'var'</span>)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-literal">yes</span> <span class="hljs-keyword">if</span> @check name
@add name, type
<span class="hljs-literal">no</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Reserve a variable name as originating from a function parameter for this
scope. No <code>var</code> required for internal references.</p>
</div>
<div class="content"><div class='highlight'><pre> parameter: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> @shared <span class="hljs-keyword">and</span> @parent.check name, <span class="hljs-literal">yes</span>
@add name, <span class="hljs-string">'param'</span></pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Just check to see if a variable has already been declared, without reserving,
walks up to the root scope.</p>
</div>
<div class="content"><div class='highlight'><pre> check: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
!!(@type(name) <span class="hljs-keyword">or</span> @parent?.check(name))</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Generate a temporary variable name at the given index.</p>
</div>
<div class="content"><div class='highlight'><pre> temporary: <span class="hljs-function"><span class="hljs-params">(name, index, single=<span class="hljs-literal">false</span>)</span> -&gt;</span>
<span class="hljs-keyword">if</span> single
startCode = name.charCodeAt(<span class="hljs-number">0</span>)
endCode = <span class="hljs-string">'z'</span>.charCodeAt(<span class="hljs-number">0</span>)
diff = endCode - startCode
newCode = startCode + index % (diff + <span class="hljs-number">1</span>)
letter = String.fromCharCode(newCode)
num = index <span class="hljs-regexp">//</span> (diff + <span class="hljs-number">1</span>)
<span class="hljs-string">"<span class="hljs-subst">#{letter}</span><span class="hljs-subst">#{num <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>}</span>"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"<span class="hljs-subst">#{name}</span><span class="hljs-subst">#{index <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>}</span>"</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Gets the type of a variable.</p>
</div>
<div class="content"><div class='highlight'><pre> type: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
<span class="hljs-keyword">return</span> v.type <span class="hljs-keyword">for</span> v <span class="hljs-keyword">in</span> @variables <span class="hljs-keyword">when</span> v.name <span class="hljs-keyword">is</span> name
<span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>If we need to store an intermediate result, find an available name for a
compiler-generated variable. <code>_var</code>, <code>_var2</code>, and so on…</p>
</div>
<div class="content"><div class='highlight'><pre> freeVariable: <span class="hljs-function"><span class="hljs-params">(name, options={})</span> -&gt;</span>
index = <span class="hljs-number">0</span>
<span class="hljs-keyword">loop</span>
temp = @temporary name, index, options.single
<span class="hljs-keyword">break</span> <span class="hljs-keyword">unless</span> @check(temp) <span class="hljs-keyword">or</span> temp <span class="hljs-keyword">in</span> @root.referencedVars
index++
@add temp, <span class="hljs-string">'var'</span>, <span class="hljs-literal">yes</span> <span class="hljs-keyword">if</span> options.reserve ? <span class="hljs-literal">true</span>
temp</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Ensure that an assignment is made at the top of this scope
(or at the top-level scope, if requested).</p>
</div>
<div class="content"><div class='highlight'><pre> assign: <span class="hljs-function"><span class="hljs-params">(name, value)</span> -&gt;</span>
@add name, {value, assigned: <span class="hljs-literal">yes</span>}, <span class="hljs-literal">yes</span>
@hasAssignments = <span class="hljs-literal">yes</span></pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Does this scope have any declared variables?</p>
</div>
<div class="content"><div class='highlight'><pre> hasDeclarations: <span class="hljs-function">-&gt;</span>
!!@declaredVariables().length</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Return the list of variables first declared in this scope.</p>
</div>
<div class="content"><div class='highlight'><pre> declaredVariables: <span class="hljs-function">-&gt;</span>
(v.name <span class="hljs-keyword">for</span> v <span class="hljs-keyword">in</span> @variables <span class="hljs-keyword">when</span> v.type <span class="hljs-keyword">is</span> <span class="hljs-string">'var'</span>).sort()</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Return the list of assignments that are supposed to be made at the top
of this scope.</p>
</div>
<div class="content"><div class='highlight'><pre> assignedVariables: <span class="hljs-function">-&gt;</span>
<span class="hljs-string">"<span class="hljs-subst">#{v.name}</span> = <span class="hljs-subst">#{v.type.value}</span>"</span> <span class="hljs-keyword">for</span> v <span class="hljs-keyword">in</span> @variables <span class="hljs-keyword">when</span> v.type.assigned</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,523 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>sourcemap.litcoffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffee-script.html">
coffee-script.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>sourcemap.litcoffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>Source maps allow JavaScript runtimes to match running JavaScript back to
the original source code that corresponds to it. This can be minified
JavaScript, but in our case, were concerned with mapping pretty-printed
JavaScript back to CoffeeScript.</p>
<p>In order to produce maps, we must keep track of positions (line number, column number)
that originated every node in the syntax tree, and be able to generate a
<a href="https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit">map file</a>
— which is a compact, VLQ-encoded representation of the JSON serialization
of this information — to write out alongside the generated JavaScript.</p>
<h2 id="linemap">LineMap</h2>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>A <strong>LineMap</strong> object keeps track of information about original line and column
positions for a single line of output JavaScript code.
<strong>SourceMaps</strong> are implemented in terms of <strong>LineMaps</strong>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">LineMap</span></span>
constructor: <span class="hljs-function"><span class="hljs-params">(@line)</span> -&gt;</span>
@columns = []
add: <span class="hljs-function"><span class="hljs-params">(column, [sourceLine, sourceColumn], options={})</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> @columns[column] <span class="hljs-keyword">and</span> options.noReplace
@columns[column] = {line: @line, column, sourceLine, sourceColumn}
sourceLocation: <span class="hljs-function"><span class="hljs-params">(column)</span> -&gt;</span>
column-- <span class="hljs-keyword">until</span> (mapping = @columns[column]) <span class="hljs-keyword">or</span> (column &lt;= <span class="hljs-number">0</span>)
mapping <span class="hljs-keyword">and</span> [mapping.sourceLine, mapping.sourceColumn]</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<h2 id="sourcemap">SourceMap</h2>
</div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Maps locations in a single generated JavaScript file back to locations in
the original CoffeeScript source file.</p>
<p>This is intentionally agnostic towards how a source map might be represented on
disk. Once the compiler is ready to produce a “v3”-style source map, we can walk
through the arrays of line and column buffer to produce it.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SourceMap</span></span>
constructor: <span class="hljs-function">-&gt;</span>
@lines = []</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Adds a mapping to this SourceMap. <code>sourceLocation</code> and <code>generatedLocation</code>
are both <code>[line, column]</code> arrays. If <code>options.noReplace</code> is true, then if there
is already a mapping for the specified <code>line</code> and <code>column</code>, this will have no
effect.</p>
</div>
<div class="content"><div class='highlight'><pre> add: <span class="hljs-function"><span class="hljs-params">(sourceLocation, generatedLocation, options = {})</span> -&gt;</span>
[line, column] = generatedLocation
lineMap = (@lines[line] <span class="hljs-keyword">or</span>= <span class="hljs-keyword">new</span> LineMap(line))
lineMap.add column, sourceLocation, options</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Look up the original position of a given <code>line</code> and <code>column</code> in the generated
code.</p>
</div>
<div class="content"><div class='highlight'><pre> sourceLocation: <span class="hljs-function"><span class="hljs-params">([line, column])</span> -&gt;</span>
line-- <span class="hljs-keyword">until</span> (lineMap = @lines[line]) <span class="hljs-keyword">or</span> (line &lt;= <span class="hljs-number">0</span>)
lineMap <span class="hljs-keyword">and</span> lineMap.sourceLocation column</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<h2 id="v3-sourcemap-generation">V3 SourceMap Generation</h2>
</div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Builds up a V3 source map, returning the generated JSON as a string.
<code>options.sourceRoot</code> may be used to specify the sourceRoot written to the source
map. Also, <code>options.sourceFiles</code> and <code>options.generatedFile</code> may be passed to
set “sources” and “file”, respectively.</p>
</div>
<div class="content"><div class='highlight'><pre> generate: <span class="hljs-function"><span class="hljs-params">(options = {}, code = <span class="hljs-literal">null</span>)</span> -&gt;</span>
writingline = <span class="hljs-number">0</span>
lastColumn = <span class="hljs-number">0</span>
lastSourceLine = <span class="hljs-number">0</span>
lastSourceColumn = <span class="hljs-number">0</span>
needComma = <span class="hljs-literal">no</span>
buffer = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> lineMap, lineNumber <span class="hljs-keyword">in</span> @lines <span class="hljs-keyword">when</span> lineMap
<span class="hljs-keyword">for</span> mapping <span class="hljs-keyword">in</span> lineMap.columns <span class="hljs-keyword">when</span> mapping
<span class="hljs-keyword">while</span> writingline &lt; mapping.line
lastColumn = <span class="hljs-number">0</span>
needComma = <span class="hljs-literal">no</span>
buffer += <span class="hljs-string">";"</span>
writingline++</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Write a comma if weve already written a segment on this line.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> needComma
buffer += <span class="hljs-string">","</span>
needComma = <span class="hljs-literal">no</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Write the next segment. Segments can be 1, 4, or 5 values. If just one, then it
is a generated column which doesnt match anything in the source code.</p>
<p>The starting column in the generated source, relative to any previous recorded
column for the current line:</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq mapping.column - lastColumn
lastColumn = mapping.column</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>The index into the list of sources:</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq <span class="hljs-number">0</span></pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>The starting line in the original source, relative to the previous source line.</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq mapping.sourceLine - lastSourceLine
lastSourceLine = mapping.sourceLine</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>The starting column in the original source, relative to the previous column.</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq mapping.sourceColumn - lastSourceColumn
lastSourceColumn = mapping.sourceColumn
needComma = <span class="hljs-literal">yes</span></pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Produce the canonical JSON object format for a “v3” source map.</p>
</div>
<div class="content"><div class='highlight'><pre> v3 =
version: <span class="hljs-number">3</span>
file: options.generatedFile <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>
sourceRoot: options.sourceRoot <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>
sources: options.sourceFiles <span class="hljs-keyword">or</span> [<span class="hljs-string">''</span>]
names: []
mappings: buffer
v3.sourcesContent = [code] <span class="hljs-keyword">if</span> options.inlineMap
v3</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<h2 id="base64-vlq-encoding">Base64 VLQ Encoding</h2>
</div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Note that SourceMap VLQ encoding is “backwards”. MIDI-style VLQ encoding puts
the most-significant-bit (MSB) from the original value into the MSB of the VLQ
encoded value (see <a href="http://en.wikipedia.org/wiki/File:Uintvar_coding.svg">Wikipedia</a>).
SourceMap VLQ does things the other way around, with the least significat four
bits of the original value encoded into the first byte of the VLQ encoded value.</p>
</div>
<div class="content"><div class='highlight'><pre> VLQ_SHIFT = <span class="hljs-number">5</span>
VLQ_CONTINUATION_BIT = <span class="hljs-number">1</span> &lt;&lt; VLQ_SHIFT <span class="hljs-comment"># 0010 0000</span>
VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - <span class="hljs-number">1</span> <span class="hljs-comment"># 0001 1111</span>
encodeVlq: <span class="hljs-function"><span class="hljs-params">(value)</span> -&gt;</span>
answer = <span class="hljs-string">''</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Least significant bit represents the sign.</p>
</div>
<div class="content"><div class='highlight'><pre> signBit = <span class="hljs-keyword">if</span> value &lt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-number">0</span></pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>The next bits are the actual value.</p>
</div>
<div class="content"><div class='highlight'><pre> valueToEncode = (Math.abs(value) &lt;&lt; <span class="hljs-number">1</span>) + signBit</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Make sure we encode at least one character, even if valueToEncode is 0.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> valueToEncode <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> answer
nextChunk = valueToEncode &amp; VLQ_VALUE_MASK
valueToEncode = valueToEncode &gt;&gt; VLQ_SHIFT
nextChunk |= VLQ_CONTINUATION_BIT <span class="hljs-keyword">if</span> valueToEncode
answer += @encodeBase64 nextChunk
answer</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<h2 id="regular-base64-encoding">Regular Base64 Encoding</h2>
</div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre> BASE64_CHARS = <span class="hljs-string">'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'</span>
encodeBase64: <span class="hljs-function"><span class="hljs-params">(value)</span> -&gt;</span>
BASE64_CHARS[value] <span class="hljs-keyword">or</span> <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"Cannot Base64 encode value: <span class="hljs-subst">#{value}</span>"</span></pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Our API for source maps is just the <code>SourceMap</code> class.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">module</span>.exports = SourceMap</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,400 +0,0 @@
/**
* CoffeeScript Compiler v1.12.5
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
var $jscomp={scope:{},checkStringArgs:function(t,ua,pa){if(null==t)throw new TypeError("The 'this' value for String.prototype."+pa+" must not be null or undefined");if(ua instanceof RegExp)throw new TypeError("First argument to String.prototype."+pa+" must not be a regular expression");return t+""}};
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,ua,pa){if(pa.get||pa.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[ua]=pa.value)};$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(t,ua,pa,e){if(ua){pa=$jscomp.global;t=t.split(".");for(e=0;e<t.length-1;e++){var va=t[e];va in pa||(pa[va]={});pa=pa[va]}t=t[t.length-1];e=pa[t];ua=ua(e);ua!=e&&null!=ua&&$jscomp.defineProperty(pa,t,{configurable:!0,writable:!0,value:ua})}};
$jscomp.polyfill("String.prototype.repeat",function(t){return t?t:function(t){var pa=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var e="";t;)if(t&1&&(e+=pa),t>>>=1)pa+=pa;return e}},"es6-impl","es3");$jscomp.findInternal=function(t,ua,pa){t instanceof String&&(t=String(t));for(var e=t.length,va=0;va<e;va++){var Ba=t[va];if(ua.call(pa,Ba,va,t))return{i:va,v:Ba}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(t){return t?t:function(t,pa){return $jscomp.findInternal(this,t,pa).v}},"es6-impl","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.arrayIterator=function(t){var ua=0;return $jscomp.iteratorPrototype(function(){return ua<t.length?{done:!1,value:t[ua++]}:{done:!0}})};$jscomp.iteratorPrototype=function(t){$jscomp.initSymbolIterator();t={next:t};t[$jscomp.global.Symbol.iterator]=function(){return this};return t};$jscomp.array=$jscomp.array||{};
$jscomp.iteratorFromArray=function(t,ua){$jscomp.initSymbolIterator();t instanceof String&&(t+="");var pa=0,e={next:function(){if(pa<t.length){var va=pa++;return{value:ua(va,t[va]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(t){return t?t:function(){return $jscomp.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");
(function(t){var ua=function(){function t(e){return t[e]}t["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.5",license:"MIT",engines:{node:"\x3e\x3d0.8.0"},directories:{lib:"./lib/coffee-script"},main:"./lib/coffee-script/coffee-script",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],preferGlobal:!0,scripts:{test:"node ./bin/cake test",
"test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{docco:"~0.7.0","google-closure-compiler-js":"^20170218.0.0","highlight.js":"~9.10.0",jison:"\x3e\x3d0.4.17","markdown-it":"^8.3.1",underscore:"~1.8.3"}};t["./helpers"]=function(){var e={};(function(){var t,Ba,V,a,c,Da;e.starts=function(a,c,p){return c===a.substr(p,c.length)};
e.ends=function(a,c,p){var g;g=c.length;return c===a.substr(a.length-g-(p||0),g)};e.repeat=c=function(a,c){var g;for(g="";0<c;)c&1&&(g+=a),c>>>=1,a+=a;return g};e.compact=function(a){var g,c,e,V;V=[];g=0;for(e=a.length;g<e;g++)(c=a[g])&&V.push(c);return V};e.count=function(a,c){var g,v;g=v=0;if(!c.length)return 1/0;for(;v=1+a.indexOf(c,v);)g++;return g};e.merge=function(a,c){return Ba(Ba({},a),c)};Ba=e.extend=function(a,c){var g,v;for(g in c)v=c[g],a[g]=v;return a};e.flatten=V=function(a){var g,c,
e,G;c=[];e=0;for(G=a.length;e<G;e++)g=a[e],"[object Array]"===Object.prototype.toString.call(g)?c=c.concat(V(g)):c.push(g);return c};e.del=function(a,c){var g;g=a[c];delete a[c];return g};e.some=null!=(a=Array.prototype.some)?a:function(a){var g,c,e;c=0;for(e=this.length;c<e;c++)if(g=this[c],a(g))return!0;return!1};e.invertLiterate=function(a){var g;g=!0;var c,e,V,F;V=a.split("\n");F=[];c=0;for(e=V.length;c<e;c++)a=V[c],g&&/^([ ]{4}|[ ]{0,3}\t)/.test(a)?F.push(a):(g=/^\s*$/.test(a))?F.push(a):F.push("# "+
a);return F.join("\n")};t=function(a,c){return c?{first_line:a.first_line,first_column:a.first_column,last_line:c.last_line,last_column:c.last_column}:a};e.addLocationDataFn=function(a,c){return function(g){"object"===typeof g&&g.updateLocationDataIfMissing&&g.updateLocationDataIfMissing(t(a,c));return g}};e.locationDataToString=function(a){var g;"2"in a&&"first_line"in a[2]?g=a[2]:"first_line"in a&&(g=a);return g?g.first_line+1+":"+(g.first_column+1)+"-"+(g.last_line+1+":"+(g.last_column+1)):"No location data"};
e.baseFileName=function(a,c,e){null==c&&(c=!1);null==e&&(e=!1);a=a.split(e?/\\|\//:/\//);a=a[a.length-1];if(!(c&&0<=a.indexOf(".")))return a;a=a.split(".");a.pop();"coffee"===a[a.length-1]&&1<a.length&&a.pop();return a.join(".")};e.isCoffee=function(a){return/\.((lit)?coffee|coffee\.md)$/.test(a)};e.isLiterate=function(a){return/\.(litcoffee|coffee\.md)$/.test(a)};e.throwSyntaxError=function(a,c){a=new SyntaxError(a);a.location=c;a.toString=Da;a.stack=a.toString();throw a;};e.updateSyntaxError=function(a,
c,e){a.toString===Da&&(a.code||(a.code=c),a.filename||(a.filename=e),a.stack=a.toString());return a};Da=function(){var a,e,p,V,G,F,x,w,K,t;if(!this.code||!this.location)return Error.prototype.toString.call(this);a=this.location;F=a.first_line;G=a.first_column;p=a.last_line;x=a.last_column;null==p&&(p=F);null==x&&(x=G);V=this.filename||"[stdin]";a=this.code.split("\n")[F];p=F===p?x+1:a.length;x=a.slice(0,G).replace(/[^\s]/g," ")+c("^",p-G);"undefined"!==typeof process&&null!==process&&(e=(null!=(w=
process.stdout)?w.isTTY:void 0)&&!(null!=(K=process.env)&&K.NODE_DISABLE_COLORS));if(null!=(t=this.colorful)?t:e)e=function(a){return"\u001b[1;31m"+a+"\u001b[0m"},a=a.slice(0,G)+e(a.slice(G,p))+a.slice(p),x=e(x);return V+":"+(F+1)+":"+(G+1)+": error: "+this.message+"\n"+a+"\n"+x};e.nameWhitespaceCharacter=function(a){switch(a){case " ":return"space";case "\n":return"newline";case "\r":return"carriage return";case "\t":return"tab";default:return a}}}).call(this);return e}();t["./rewriter"]=function(){var e=
{};(function(){var t,Ba,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E=[].indexOf||function(a){for(var c=0,g=this.length;c<g;c++)if(c in this&&this[c]===a)return c;return-1},N=[].slice;w=function(a,c,g){a=[a,c];a.generated=!0;g&&(a.origin=g);return a};e.Rewriter=function(){function k(){}k.prototype.rewrite=function(a){this.tokens=a;this.removeLeadingNewlines();this.closeOpenCalls();this.closeOpenIndexes();this.normalizeLines();this.tagPostfixConditionals();this.addImplicitBracesAndParens();this.addLocationDataToGeneratedTokens();
this.fixOutdentLocationData();return this.tokens};k.prototype.scanTokens=function(a){var c,m,h;h=this.tokens;for(c=0;m=h[c];)c+=a.call(this,m,c,h);return!0};k.prototype.detectEnd=function(m,g,r){var h,q,k,e,B;B=this.tokens;for(h=0;e=B[m];){if(0===h&&g.call(this,e,m))return r.call(this,e,m);if(!e||0>h)return r.call(this,e,m-1);(q=e[0],0<=E.call(c,q))?h+=1:(k=e[0],0<=E.call(a,k))&&--h;m+=1}return m-1};k.prototype.removeLeadingNewlines=function(){var a,c,g,h,y;h=this.tokens;a=c=0;for(g=h.length;c<g&&
(y=h[a][0],"TERMINATOR"===y);a=++c);if(a)return this.tokens.splice(0,a)};k.prototype.closeOpenCalls=function(){var a,c;c=function(a,c){var h;return")"===(h=a[0])||"CALL_END"===h||"OUTDENT"===a[0]&&")"===this.tag(c-1)};a=function(a,c){return this.tokens["OUTDENT"===a[0]?c-1:c][0]="CALL_END"};return this.scanTokens(function(g,h){"CALL_START"===g[0]&&this.detectEnd(h+1,c,a);return 1})};k.prototype.closeOpenIndexes=function(){var a,c;c=function(a,c){var h;return"]"===(h=a[0])||"INDEX_END"===h};a=function(a,
c){return a[0]="INDEX_END"};return this.scanTokens(function(g,h){"INDEX_START"===g[0]&&this.detectEnd(h+1,c,a);return 1})};k.prototype.indexOfTag=function(){var a,c,g,h,e,k,u;c=arguments[0];e=2<=arguments.length?N.call(arguments,1):[];g=h=a=0;for(k=e.length;0<=k?h<k:h>k;g=0<=k?++h:--h){for(;"HERECOMMENT"===this.tag(c+g+a);)a+=2;if(null!=e[g]&&("string"===typeof e[g]&&(e[g]=[e[g]]),u=this.tag(c+g+a),0>E.call(e[g],u)))return-1}return c+g+a-1};k.prototype.looksObjectish=function(g){var m;if(-1<this.indexOfTag(g,
"@",null,":")||-1<this.indexOfTag(g,null,":"))return!0;g=this.indexOfTag(g,c);return-1<g&&(m=null,this.detectEnd(g+1,function(c){var h;return h=c[0],0<=E.call(a,h)},function(a,c){return m=c}),":"===this.tag(m+1))?!0:!1};k.prototype.findTagsBackwards=function(g,e){var m,h,k,q,u,B,p;for(m=[];0<=g&&(m.length||(q=this.tag(g),0>E.call(e,q))&&((u=this.tag(g),0>E.call(c,u))||this.tokens[g].generated)&&(B=this.tag(g),0>E.call(G,B)));)(h=this.tag(g),0<=E.call(a,h))&&m.push(this.tag(g)),(k=this.tag(g),0<=E.call(c,
k))&&m.length&&m.pop(),--g;return p=this.tag(g),0<=E.call(e,p)};k.prototype.addImplicitBracesAndParens=function(){var m,e;m=[];e=null;return this.scanTokens(function(k,h,q){var r,u,y,V,z,H,l,x,C,A,t,D,K,F,I,M,N,J;J=k[0];A=(t=0<h?q[h-1]:[])[0];C=(h<q.length-1?q[h+1]:[])[0];I=function(){return m[m.length-1]};M=h;y=function(a){return h-M+a};V=function(){var a,c;return null!=(a=I())?null!=(c=a[2])?c.ours:void 0:void 0};z=function(){var a;return V()&&"("===(null!=(a=I())?a[0]:void 0)};l=function(){var a;
return V()&&"{"===(null!=(a=I())?a[0]:void 0)};H=function(){var a;return V&&"CONTROL"===(null!=(a=I())?a[0]:void 0)};N=function(a){var c;c=null!=a?a:h;m.push(["(",c,{ours:!0}]);q.splice(c,0,w("CALL_START","("));if(null==a)return h+=1};r=function(){m.pop();q.splice(h,0,w("CALL_END",")",["","end of input",k[2]]));return h+=1};x=function(a,c){var g;null==c&&(c=!0);g=null!=a?a:h;m.push(["{",g,{sameLine:!0,startsLine:c,ours:!0}]);c=new String("{");c.generated=!0;q.splice(g,0,w("{",c,k));if(null==a)return h+=
1};u=function(a){a=null!=a?a:h;m.pop();q.splice(a,0,w("}","}",k));return h+=1};if(z()&&("IF"===J||"TRY"===J||"FINALLY"===J||"CATCH"===J||"CLASS"===J||"SWITCH"===J))return m.push(["CONTROL",h,{ours:!0}]),y(1);if("INDENT"===J&&V()){if("\x3d\x3e"!==A&&"-\x3e"!==A&&"["!==A&&"("!==A&&","!==A&&"{"!==A&&"TRY"!==A&&"ELSE"!==A&&"\x3d"!==A)for(;z();)r();H()&&m.pop();m.push([J,h]);return y(1)}if(0<=E.call(c,J))return m.push([J,h]),y(1);if(0<=E.call(a,J)){for(;V();)z()?r():l()?u():m.pop();e=m.pop()}if((0<=E.call(v,
J)&&k.spaced||"?"===J&&0<h&&!q[h-1].spaced)&&(0<=E.call(Da,C)||0<=E.call(p,C)&&(null==(D=q[h+1])||!D.spaced)&&(null==(K=q[h+1])||!K.newLine)))return"?"===J&&(J=k[0]="FUNC_EXIST"),N(h+1),y(2);if(0<=E.call(v,J)&&-1<this.indexOfTag(h+1,"INDENT")&&this.looksObjectish(h+2)&&!this.findTagsBackwards(h,"CLASS EXTENDS IF CATCH SWITCH LEADING_WHEN FOR WHILE UNTIL".split(" ")))return N(h+1),m.push(["INDENT",h+2]),y(3);if(":"===J){for(u=function(){var c;switch(!1){case c=this.tag(h-1),0>E.call(a,c):return e[1];
case "@"!==this.tag(h-2):return h-2;default:return h-1}}.call(this);"HERECOMMENT"===this.tag(u-2);)u-=2;this.insideForDeclaration="FOR"===C;H=0===u||(F=this.tag(u-1),0<=E.call(G,F))||q[u-1].newLine;if(I()&&(l=I(),F=l[0],t=l[1],("{"===F||"INDENT"===F&&"{"===this.tag(t-1))&&(H||","===this.tag(u-1)||"{"===this.tag(u-1))))return y(1);x(u,!!H);return y(2)}l()&&0<=E.call(G,J)&&(I()[2].sameLine=!1);x="OUTDENT"===A||t.newLine;if(0<=E.call(g,J)||0<=E.call(Ba,J)&&x)for(;V();)if(x=I(),F=x[0],t=x[1],F=x[2],x=
F.sameLine,H=F.startsLine,z()&&","!==A)r();else if(l()&&!this.insideForDeclaration&&x&&"TERMINATOR"!==J&&":"!==A)u();else if(!l()||"TERMINATOR"!==J||","===A||H&&this.looksObjectish(h+1))break;else{if("HERECOMMENT"===C)return y(1);u()}if(!(","!==J||this.looksObjectish(h+1)||!l()||this.insideForDeclaration||"TERMINATOR"===C&&this.looksObjectish(h+2)))for(C="OUTDENT"===C?1:0;l();)u(h+C);return y(1)})};k.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(a,c,g){var h,
m,k;if(a[2]||!a.generated&&!a.explicit)return 1;"{"===a[0]&&(h=null!=(k=g[c+1])?k[2]:void 0)?(m=h.first_line,h=h.first_column):(h=null!=(m=g[c-1])?m[2]:void 0)?(m=h.last_line,h=h.last_column):m=h=0;a[2]={first_line:m,first_column:h,last_line:m,last_column:h};return 1})};k.prototype.fixOutdentLocationData=function(){return this.scanTokens(function(a,c,g){if(!("OUTDENT"===a[0]||a.generated&&"CALL_END"===a[0]||a.generated&&"}"===a[0]))return 1;c=g[c-1][2];a[2]={first_line:c.last_line,first_column:c.last_column,
last_line:c.last_line,last_column:c.last_column};return 1})};k.prototype.normalizeLines=function(){var a,c,g,h,k;k=g=h=null;c=function(a,c){var g,h,m,e;return";"!==a[1]&&(g=a[0],0<=E.call(F,g))&&!("TERMINATOR"===a[0]&&(h=this.tag(c+1),0<=E.call(V,h)))&&!("ELSE"===a[0]&&"THEN"!==k)&&!!("CATCH"!==(m=a[0])&&"FINALLY"!==m||"-\x3e"!==k&&"\x3d\x3e"!==k)||(e=a[0],0<=E.call(Ba,e))&&this.tokens[c-1].newLine};a=function(a,c){return this.tokens.splice(","===this.tag(c-1)?c-1:c,0,h)};return this.scanTokens(function(m,
e,q){var r,y,p;m=m[0];if("TERMINATOR"===m){if("ELSE"===this.tag(e+1)&&"OUTDENT"!==this.tag(e-1))return q.splice.apply(q,[e,1].concat(N.call(this.indentation()))),1;if(r=this.tag(e+1),0<=E.call(V,r))return q.splice(e,1),0}if("CATCH"===m)for(r=y=1;2>=y;r=++y)if("OUTDENT"===(p=this.tag(e+r))||"TERMINATOR"===p||"FINALLY"===p)return q.splice.apply(q,[e+r,0].concat(N.call(this.indentation()))),2+r;0<=E.call(x,m)&&"INDENT"!==this.tag(e+1)&&("ELSE"!==m||"IF"!==this.tag(e+1))&&(k=m,p=this.indentation(q[e]),
g=p[0],h=p[1],"THEN"===k&&(g.fromThen=!0),q.splice(e+1,0,g),this.detectEnd(e+2,c,a),"THEN"===m&&q.splice(e,1));return 1})};k.prototype.tagPostfixConditionals=function(){var a,c,g;g=null;c=function(a,c){a=a[0];c=this.tokens[c-1][0];return"TERMINATOR"===a||"INDENT"===a&&0>E.call(x,c)};a=function(a,c){if("INDENT"!==a[0]||a.generated&&!a.fromThen)return g[0]="POST_"+g[0]};return this.scanTokens(function(h,m){if("IF"!==h[0])return 1;g=h;this.detectEnd(m+1,c,a);return 1})};k.prototype.indentation=function(a){var c,
g;c=["INDENT",2];g=["OUTDENT",2];a?(c.generated=g.generated=!0,c.origin=g.origin=a):c.explicit=g.explicit=!0;return[c,g]};k.prototype.generate=w;k.prototype.tag=function(a){var c;return null!=(c=this.tokens[a])?c[0]:void 0};return k}();t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]];e.INVERSES=l={};c=[];a=[];K=0;for(I=t.length;K<I;K++)z=t[K],M=z[0],z=z[1],
c.push(l[z]=M),a.push(l[M]=z);V=["CATCH","THEN","ELSE","FINALLY"].concat(a);v="IDENTIFIER PROPERTY SUPER ) CALL_END ] INDEX_END @ THIS".split(" ");Da="IDENTIFIER PROPERTY NUMBER INFINITY NAN STRING STRING_START REGEX REGEX_START JS NEW PARAM_START CLASS IF TRY SWITCH THIS UNDEFINED NULL BOOL UNARY YIELD UNARY_MATH SUPER THROW @ -\x3e \x3d\x3e [ ( { -- ++".split(" ");p=["+","-"];g="POST_IF FOR WHILE UNTIL WHEN BY LOOP TERMINATOR".split(" ");x="ELSE -\x3e \x3d\x3e TRY FINALLY THEN".split(" ");F="TERMINATOR CATCH FINALLY ELSE OUTDENT LEADING_WHEN".split(" ");
G=["TERMINATOR","INDENT","OUTDENT"];Ba=[".","?.","::","?::"]}).call(this);return e}();t["./lexer"]=function(){var e={};(function(){var va,Ba,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E,N,k,m,q,r,h,y,O,u,B,T,S,H,ba,R,C,A,W,D,P,Y,Z,U,aa,J,ca,Q,pa,ua,Ua,ja,da,ea,ha,ia,ka,la,L,fa,qa,ra,X=[].indexOf||function(a){for(var c=0,g=this.length;c<g;c++)if(c in this&&this[c]===a)return c;return-1},sa=[].slice;fa=t("./rewriter");D=fa.Rewriter;N=fa.INVERSES;fa=t("./helpers");ha=fa.count;qa=fa.repeat;ia=fa.invertLiterate;
ra=fa.throwSyntaxError;e.Lexer=function(){function e(){}e.prototype.tokenize=function(a,c){var g,h,e,Ca;null==c&&(c={});this.literate=c.literate;this.outdebt=this.indebt=this.baseIndent=this.indent=0;this.indents=[];this.ends=[];this.tokens=[];this.exportSpecifierList=this.importSpecifierList=this.seenExport=this.seenImport=this.seenFor=!1;this.chunkLine=c.line||0;this.chunkColumn=c.column||0;a=this.clean(a);for(e=0;this.chunk=a.slice(e);)if(g=this.identifierToken()||this.commentToken()||this.whitespaceToken()||
this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),Ca=this.getLineAndColumnFromChunk(g),this.chunkLine=Ca[0],this.chunkColumn=Ca[1],e+=g,c.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:e};this.closeIndentation();(h=this.ends.pop())&&this.error("missing "+h.tag,h.origin[2]);return!1===c.rewrite?this.tokens:(new D).rewrite(this.tokens)};e.prototype.clean=function(a){a.charCodeAt(0)===va&&(a=a.slice(1));a=a.replace(/\r/g,
"").replace(ua,"");ea.test(a)&&(a="\n"+a,this.chunkLine--);this.literate&&(a=ia(a));return a};e.prototype.identifierToken=function(){var g,h,e,k,q,y,p,u,V,w,z,B,l;if(!(h=I.exec(this.chunk)))return 0;q=h[0];e=h[1];h=h[2];k=e.length;y=void 0;if("own"===e&&"FOR"===this.tag())return this.token("OWN",e),e.length;if("from"===e&&"YIELD"===this.tag())return this.token("FROM",e),e.length;if("as"===e&&this.seenImport){if("*"===this.value())this.tokens[this.tokens.length-1][0]="IMPORT_ALL";else if(p=this.value(),
0<=X.call(Da,p))this.tokens[this.tokens.length-1][0]="IDENTIFIER";if("DEFAULT"===(u=this.tag())||"IMPORT_ALL"===u||"IDENTIFIER"===u)return this.token("AS",e),e.length}if("as"===e&&this.seenExport&&("IDENTIFIER"===(V=this.tag())||"DEFAULT"===V))return this.token("AS",e),e.length;if("default"===e&&this.seenExport&&("EXPORT"===(w=this.tag())||"AS"===w))return this.token("DEFAULT",e),e.length;p=this.tokens;p=p[p.length-1];l=h||null!=p&&("."===(z=p[0])||"?."===z||"::"===z||"?::"===z||!p.spaced&&"@"===
p[0])?"PROPERTY":"IDENTIFIER";"IDENTIFIER"!==l||!(0<=X.call(m,e)||0<=X.call(Da,e))||this.exportSpecifierList&&0<=X.call(Da,e)?"IDENTIFIER"===l&&this.seenFor&&"from"===e&&ka(p)&&(l="FORFROM",this.seenFor=!1):(l=e.toUpperCase(),"WHEN"===l&&(B=this.tag(),0<=X.call(r,B))?l="LEADING_WHEN":"FOR"===l?this.seenFor=!0:"UNLESS"===l?l="IF":"IMPORT"===l?this.seenImport=!0:"EXPORT"===l?this.seenExport=!0:0<=X.call(Ua,l)?l="UNARY":0<=X.call(A,l)&&("INSTANCEOF"!==l&&this.seenFor?(l="FOR"+l,this.seenFor=!1):(l="RELATION",
"!"===this.value()&&(y=this.tokens.pop(),e="!"+e))));"IDENTIFIER"===l&&0<=X.call(W,e)&&this.error("reserved word '"+e+"'",{length:e.length});"PROPERTY"!==l&&(0<=X.call(a,e)&&(g=e,e=c[e]),l=function(){switch(e){case "!":return"UNARY";case "\x3d\x3d":case "!\x3d":return"COMPARE";case "true":case "false":return"BOOL";case "break":case "continue":case "debugger":return"STATEMENT";case "\x26\x26":case "||":return e;default:return l}}());z=this.token(l,e,0,k);g&&(z.origin=[l,g,z[2]]);y&&(g=[y[2].first_line,
y[2].first_column],z[2].first_line=g[0],z[2].first_column=g[1]);h&&(g=q.lastIndexOf(":"),this.token(":",":",g,h.length));return q.length};e.prototype.numberToken=function(){var a,c,g,e;if(!(c=B.exec(this.chunk)))return 0;g=c[0];c=g.length;switch(!1){case !/^0[BOX]/.test(g):this.error("radix prefix in '"+g+"' must be lowercase",{offset:1});break;case !/^(?!0x).*E/.test(g):this.error("exponential notation in '"+g+"' must be indicated with a lowercase 'e'",{offset:g.indexOf("E")});break;case !/^0\d*[89]/.test(g):this.error("decimal literal '"+
g+"' must not be prefixed with '0'",{length:c});break;case !/^0\d+/.test(g):this.error("octal literal '"+g+"' must be prefixed with '0o'",{length:c})}a=function(){switch(g.charAt(1)){case "b":return 2;case "o":return 8;case "x":return 16;default:return null}}();a=null!=a?parseInt(g.slice(2),a):parseFloat(g);if("b"===(e=g.charAt(1))||"o"===e)g="0x"+a.toString(16);this.token(Infinity===a?"INFINITY":"NUMBER",g,0,c);return c};e.prototype.stringToken=function(){var a,c,g,e,h,m,k,r,p,y,l,u;p=(Q.exec(this.chunk)||
[])[0];if(!p)return 0;this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&(this.tokens[this.tokens.length-1][0]="FROM");g=function(){switch(p){case "'":return ca;case '"':return U;case "'''":return x;case '"""':return G}}();e=3===p.length;g=this.matchWithInterpolations(g,p);u=g.tokens;h=g.index;a=u.length-1;g=p.charAt(0);if(e){k=null;for(e=function(){var a,c,g;g=[];m=a=0;for(c=u.length;a<c;m=++a)l=u[m],"NEOSTRING"===l[0]&&g.push(l[1]);return g}().join("#{}");c=F.exec(e);)if(c=
c[1],null===k||0<(y=c.length)&&y<k.length)k=c;k&&(r=RegExp("\\n"+k,"g"));this.mergeInterpolationTokens(u,{delimiter:g},function(c){return function(g,e){g=c.formatString(g);r&&(g=g.replace(r,"\n"));0===e&&(g=g.replace(q,""));e===a&&(g=g.replace(pa,""));return g}}(this))}else this.mergeInterpolationTokens(u,{delimiter:g},function(c){return function(g,e){g=c.formatString(g);return g=g.replace(Y,function(c,b){return 0===e&&0===b||e===a&&b+c.length===g.length?"":" "})}}(this));return h};e.prototype.commentToken=
function(){var a,c,e;if(!(e=this.chunk.match(g)))return 0;a=e[0];if(c=e[1])(e=l.exec(a))&&this.error("block comments cannot contain "+e[0],{offset:e.index,length:e[0].length}),0<=c.indexOf("\n")&&(c=c.replace(RegExp("\\n"+qa(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",c,0,a.length);return a.length};e.prototype.jsToken=function(){var a,c;if("`"!==this.chunk.charAt(0)||!(a=M.exec(this.chunk)||k.exec(this.chunk)))return 0;c=a[1].replace(/\\+(`|$)/g,function(a){return a.slice(-Math.ceil(a.length/
2))});this.token("JS",c,0,a[0].length);return a[0].length};e.prototype.regexToken=function(){var a,c,g,e,h,m,k,q;switch(!1){case !(c=R.exec(this.chunk)):this.error("regular expressions cannot begin with "+c[2],{offset:c.index+c[1].length});break;case !(c=this.matchWithInterpolations(w,"///")):q=c.tokens;h=c.index;break;case !(c=H.exec(this.chunk)):k=c[0];a=c[1];c=c[2];this.validateEscapes(a,{isRegex:!0,offsetInChunk:1});h=k.length;m=this.tokens;if(m=m[m.length-1])if(m.spaced&&(g=m[0],0<=X.call(Ba,
g))){if(!c||S.test(k))return 0}else if(e=m[0],0<=X.call(u,e))return 0;c||this.error("missing / (unclosed regex)");break;default:return 0}e=ba.exec(this.chunk.slice(h))[0];g=h+e.length;c=this.makeToken("REGEX",null,0,g);switch(!1){case !!da.test(e):this.error("invalid regular expression flags "+e,{offset:h,length:e.length});break;case !(k||1===q.length):null==a&&(a=this.formatHeregex(q[0][1]));this.token("REGEX",""+this.makeDelimitedLiteral(a,{delimiter:"/"})+e,0,g,c);break;default:this.token("REGEX_START",
"(",0,0,c),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(q,{delimiter:'"',double:!0},this.formatHeregex),e&&(this.token(",",",",h-1,0),this.token("STRING",'"'+e+'"',h-1,e.length)),this.token(")",")",g-1,0),this.token("REGEX_END",")",g-1,0)}return g};e.prototype.lineToken=function(){var a,c,g;if(!(c=O.exec(this.chunk)))return 0;c=c[0];this.seenFor=!1;this.importSpecifierList||(this.seenImport=!1);this.exportSpecifierList||(this.seenExport=!1);
g=c.length-1-c.lastIndexOf("\n");a=this.unfinished();if(g-this.indebt===this.indent)return a?this.suppressNewlines():this.newlineToken(0),c.length;if(g>this.indent){if(a)return this.indebt=g-this.indent,this.suppressNewlines(),c.length;if(!this.tokens.length)return this.baseIndent=this.indent=g,c.length;a=g-this.indent+this.outdebt;this.token("INDENT",a,c.length-g,g);this.indents.push(a);this.ends.push({tag:"OUTDENT"});this.outdebt=this.indebt=0;this.indent=g}else g<this.baseIndent?this.error("missing indentation",
{offset:c.length}):(this.indebt=0,this.outdentToken(this.indent-g,a,c.length));return c.length};e.prototype.outdentToken=function(a,c,g){var e,h,m,k;for(e=this.indent-a;0<a;)(m=this.indents[this.indents.length-1])?m===this.outdebt?(a-=this.outdebt,this.outdebt=0):m<this.outdebt?(this.outdebt-=m,a-=m):(h=this.indents.pop()+this.outdebt,g&&(k=this.chunk[g],0<=X.call(z,k))&&(e-=h-a,a=h),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",a,0,g),a-=h):a=0;h&&(this.outdebt-=a);for(;";"===this.value();)this.tokens.pop();
"TERMINATOR"===this.tag()||c||this.token("TERMINATOR","\n",g,0);this.indent=e;return this};e.prototype.whitespaceToken=function(){var a,c;if(!(a=ea.exec(this.chunk))&&"\n"!==this.chunk.charAt(0))return 0;c=this.tokens;(c=c[c.length-1])&&(c[a?"spaced":"newLine"]=!0);return a?a[0].length:0};e.prototype.newlineToken=function(a){for(;";"===this.value();)this.tokens.pop();"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",a,0);return this};e.prototype.suppressNewlines=function(){"\\"===this.value()&&
this.tokens.pop();return this};e.prototype.literalToken=function(){var a,c,g,e,h,m,k,q;(a=T.exec(this.chunk))?(a=a[0],V.test(a)&&this.tagParameters()):a=this.chunk.charAt(0);q=a;e=this.tokens;if((e=e[e.length-1])&&0<=X.call(["\x3d"].concat(sa.call(p)),a)&&(k=!1,"\x3d"!==a||"||"!==(g=e[1])&&"\x26\x26"!==g||e.spaced||(e[0]="COMPOUND_ASSIGN",e[1]+="\x3d",e=this.tokens[this.tokens.length-2],k=!0),e&&"PROPERTY"!==e[0]&&(g=null!=(c=e.origin)?c:e,(c=la(e[1],g[1]))&&this.error(c,g[2])),k))return a.length;
"{"===a&&this.seenImport?this.importSpecifierList=!0:this.importSpecifierList&&"}"===a?this.importSpecifierList=!1:"{"===a&&"EXPORT"===(null!=e?e[0]:void 0)?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===a&&(this.exportSpecifierList=!1);if(";"===a)this.seenFor=this.seenImport=this.seenExport=!1,q="TERMINATOR";else if("*"===a&&"EXPORT"===e[0])q="EXPORT_ALL";else if(0<=X.call(y,a))q="MATH";else if(0<=X.call(v,a))q="COMPARE";else if(0<=X.call(p,a))q="COMPOUND_ASSIGN";else if(0<=X.call(Ua,
a))q="UNARY";else if(0<=X.call(ja,a))q="UNARY_MATH";else if(0<=X.call(P,a))q="SHIFT";else if("?"===a&&null!=e&&e.spaced)q="BIN?";else if(e&&!e.spaced)if("("===a&&(h=e[0],0<=X.call(Ba,h)))"?"===e[0]&&(e[0]="FUNC_EXIST"),q="CALL_START";else if("["===a&&(m=e[0],0<=X.call(E,m)))switch(q="INDEX_START",e[0]){case "?":e[0]="INDEX_SOAK"}h=this.makeToken(q,a);switch(a){case "(":case "{":case "[":this.ends.push({tag:N[a],origin:h});break;case ")":case "}":case "]":this.pair(a)}this.tokens.push(h);return a.length};
e.prototype.tagParameters=function(){var a,c,g,e;if(")"!==this.tag())return this;c=[];e=this.tokens;a=e.length;for(e[--a][0]="PARAM_END";g=e[--a];)switch(g[0]){case ")":c.push(g);break;case "(":case "CALL_START":if(c.length)c.pop();else return"("===g[0]&&(g[0]="PARAM_START"),this}return this};e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)};e.prototype.matchWithInterpolations=function(a,c){var g,h,m,k,q,p,r,y;y=[];q=c.length;if(this.chunk.slice(0,q)!==c)return null;for(r=
this.chunk.slice(q);;){k=a.exec(r)[0];this.validateEscapes(k,{isRegex:"/"===c.charAt(0),offsetInChunk:q});y.push(this.makeToken("NEOSTRING",k,q));r=r.slice(k.length);q+=k.length;if("#{"!==r.slice(0,2))break;g=this.getLineAndColumnFromChunk(q+1);k=g[0];g=g[1];g=(new e).tokenize(r.slice(1),{line:k,column:g,untilBalanced:!0});k=g.tokens;h=g.index;h+=1;p=k[0];g=k[k.length-1];p[0]=p[1]="(";g[0]=g[1]=")";g.origin=["","end of interpolation",g[2]];"TERMINATOR"===(null!=(m=k[1])?m[0]:void 0)&&k.splice(1,1);
y.push(["TOKENS",k]);r=r.slice(h);q+=h}r.slice(0,c.length)!==c&&this.error("missing "+c,{length:c.length});a=y[0];m=y[y.length-1];a[2].first_column-=c.length;"\n"===m[1].substr(-1)?(m[2].last_line+=1,m[2].last_column=c.length-1):m[2].last_column+=c.length;0===m[1].length&&--m[2].last_column;return{tokens:y,index:q+c.length}};e.prototype.mergeInterpolationTokens=function(a,c,g){var e,h,m,k,q,r,p,y,l,u,V,z;1<a.length&&(y=this.token("STRING_START","(",0,0));m=this.tokens.length;k=q=0;for(r=a.length;q<
r;k=++q){u=a[k];e=u[0];z=u[1];switch(e){case "TOKENS":if(2===z.length)continue;p=z[0];V=z;break;case "NEOSTRING":e=g(u[1],k);if(0===e.length)if(0===k)h=this.tokens.length;else continue;2===k&&null!=h&&this.tokens.splice(h,2);u[0]="STRING";u[1]=this.makeDelimitedLiteral(e,c);p=u;V=[u]}this.tokens.length>m&&(k=this.token("+","+"),k[2]={first_line:p[2].first_line,first_column:p[2].first_column,last_line:p[2].first_line,last_column:p[2].first_column});(l=this.tokens).push.apply(l,V)}if(y)return a=a[a.length-
1],y.origin=["STRING",null,{first_line:y[2].first_line,first_column:y[2].first_column,last_line:a[2].last_line,last_column:a[2].last_column}],y=this.token("STRING_END",")"),y[2]={first_line:a[2].last_line,first_column:a[2].last_column,last_line:a[2].last_line,last_column:a[2].last_column}};e.prototype.pair=function(a){var c;c=this.ends;c=c[c.length-1];return a!==(c=null!=c?c.tag:void 0)?("OUTDENT"!==c&&this.error("unmatched "+a),c=this.indents,c=c[c.length-1],this.outdentToken(c,!0),this.pair(a)):
this.ends.pop()};e.prototype.getLineAndColumnFromChunk=function(a){var c,g;if(0===a)return[this.chunkLine,this.chunkColumn];g=a>=this.chunk.length?this.chunk:this.chunk.slice(0,+(a-1)+1||9E9);a=ha(g,"\n");c=this.chunkColumn;0<a?(c=g.split("\n"),c=c[c.length-1],c=c.length):c+=g.length;return[this.chunkLine+a,c]};e.prototype.makeToken=function(a,c,g,e){var h,k;null==g&&(g=0);null==e&&(e=c.length);h={};k=this.getLineAndColumnFromChunk(g);h.first_line=k[0];h.first_column=k[1];g=this.getLineAndColumnFromChunk(g+
(0<e?e-1:0));h.last_line=g[0];h.last_column=g[1];return[a,c,h]};e.prototype.token=function(a,c,g,e,h){a=this.makeToken(a,c,g,e);h&&(a.origin=h);this.tokens.push(a);return a};e.prototype.tag=function(){var a;a=this.tokens;a=a[a.length-1];return null!=a?a[0]:void 0};e.prototype.value=function(){var a;a=this.tokens;a=a[a.length-1];return null!=a?a[1]:void 0};e.prototype.unfinished=function(){var a;return h.test(this.chunk)||"\\"===(a=this.tag())||"."===a||"?."===a||"?::"===a||"UNARY"===a||"MATH"===a||
"UNARY_MATH"===a||"+"===a||"-"===a||"**"===a||"SHIFT"===a||"RELATION"===a||"COMPARE"===a||"\x26"===a||"^"===a||"|"===a||"\x26\x26"===a||"||"===a||"BIN?"===a||"THROW"===a||"EXTENDS"===a};e.prototype.formatString=function(a){return a.replace(J,"$1")};e.prototype.formatHeregex=function(a){return a.replace(K,"$1$2")};e.prototype.validateEscapes=function(a,c){var g,e,h,k,m;null==c&&(c={});if(e=(c.isRegex?C:aa).exec(a))return e[0],a=e[1],h=e[2],g=e[3],m=e[4],g="\\"+(h||g||m),this.error((h?"octal escape sequences are not allowed":
"invalid escape sequence")+" "+g,{offset:(null!=(k=c.offsetInChunk)?k:0)+e.index+a.length,length:g.length})};e.prototype.makeDelimitedLiteral=function(a,c){null==c&&(c={});""===a&&"/"===c.delimiter&&(a="(?:)");a=a.replace(RegExp("(\\\\\\\\)|(\\\\0(?\x3d[1-7]))|\\\\?("+c.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),function(a,g,e,h,k,m,q,r,p){switch(!1){case !g:return c.double?g+g:g;case !e:return"\\x00";case !h:return"\\"+h;case !k:return"\\n";case !m:return"\\r";case !q:return"\\u2028";
case !r:return"\\u2029";case !p:return c.double?"\\"+p:p}});return""+c.delimiter+a+c.delimiter};e.prototype.error=function(a,c){var g,e,h,k,m;null==c&&(c={});c="first_line"in c?c:(k=this.getLineAndColumnFromChunk(null!=(h=c.offset)?h:0),e=k[0],g=k[1],k,{first_line:e,first_column:g,last_column:g+(null!=(m=c.length)?m:1)-1});return ra(a,c)};return e}();la=function(a,c){null==c&&(c=a);switch(!1){case 0>X.call(sa.call(m).concat(sa.call(Da)),a):return"keyword '"+c+"' can't be assigned";case 0>X.call(Z,
a):return"'"+c+"' can't be assigned";case 0>X.call(W,a):return"reserved word '"+c+"' can't be assigned";default:return!1}};e.isUnassignable=la;ka=function(a){var c;return"IDENTIFIER"===a[0]?("from"===a[1]&&(a[1][0]="IDENTIFIER",!0),!0):"FOR"===a[0]?!1:"{"===(c=a[1])||"["===c||","===c||":"===c?!1:!0};m="true false null this new delete typeof in instanceof return throw break continue debugger yield if else switch for while do try catch finally class extends super import export default".split(" ");Da=
"undefined Infinity NaN then unless until loop of by when".split(" ");c={and:"\x26\x26",or:"||",is:"\x3d\x3d",isnt:"!\x3d",not:"!",yes:"true",no:"false",on:"true",off:"false"};a=function(){var a;a=[];for(L in c)a.push(L);return a}();Da=Da.concat(a);W="case function var void with const let enum native implements interface package private protected public static".split(" ");Z=["arguments","eval"];e.JS_FORBIDDEN=m.concat(W).concat(Z);va=65279;I=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/;
B=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;T=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/;ea=/^[^\n\S]+/;g=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;V=/^[-=]>/;O=/^(?:\n[^\n\S]*)+/;k=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/;M=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/;Q=/^(?:'''|"""|'|")/;ca=/^(?:[^\\']|\\[\s\S])*/;U=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/;x=/^(?:[^\\']|\\[\s\S]|'(?!''))*/;G=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/;J=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g;
Y=/\s*\n\s*/g;F=/\n+([^\n\S]*)(?=\S)/g;H=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;ba=/^\w*/;da=/^(?!.*(.).*\1)[imgy]*$/;w=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/;K=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g;R=/^(\/|\/{3}\s*)(\*)/;S=/^\/=?\s/;l=/\*\//;h=/^\s*(?:,|\??\.(?![.\d])|::)/;aa=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/;C=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/;
q=/^[^\n\S]*\n/;pa=/\n[^\n\S]*$/;ua=/\s+$/;p="-\x3d +\x3d /\x3d *\x3d %\x3d ||\x3d \x26\x26\x3d ?\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d ^\x3d |\x3d **\x3d //\x3d %%\x3d".split(" ");Ua=["NEW","TYPEOF","DELETE","DO"];ja=["!","~"];P=["\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e"];v="\x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d".split(" ");y=["*","/","%","//","%%"];A=["IN","OF","INSTANCEOF"];Ba="IDENTIFIER PROPERTY ) ] ? @ THIS SUPER".split(" ");E=Ba.concat("NUMBER INFINITY NAN STRING STRING_END REGEX REGEX_END BOOL NULL UNDEFINED } ::".split(" "));
u=E.concat(["++","--"]);r=["INDENT","OUTDENT","TERMINATOR"];z=[")","}","]"]}).call(this);return e}();t["./parser"]=function(){var e={},va={exports:e},Ba=function(){function e(){this.yy={}}var a=function(a,n,oa,b){oa=oa||{};for(b=a.length;b--;oa[a[b]]=n);return oa},c=[1,22],t=[1,25],g=[1,83],v=[1,79],p=[1,84],l=[1,85],G=[1,81],F=[1,82],x=[1,56],w=[1,58],K=[1,59],M=[1,60],I=[1,61],z=[1,62],E=[1,49],N=[1,50],k=[1,32],m=[1,68],q=[1,69],r=[1,78],h=[1,47],y=[1,51],O=[1,52],u=[1,67],B=[1,65],T=[1,66],S=
[1,64],H=[1,42],ba=[1,48],R=[1,63],C=[1,73],A=[1,74],W=[1,75],D=[1,76],P=[1,46],Y=[1,72],Z=[1,34],U=[1,35],aa=[1,36],J=[1,37],ca=[1,38],Q=[1,39],Ba=[1,86],va=[1,6,32,42,131],pa=[1,101],ja=[1,89],da=[1,88],ea=[1,87],ha=[1,90],ia=[1,91],ka=[1,92],la=[1,93],L=[1,94],fa=[1,95],qa=[1,96],ra=[1,97],X=[1,98],sa=[1,99],ma=[1,100],Ca=[1,104],ta=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],ua=[2,166],Ra=[1,110],Ga=[1,111],Sa=[1,
112],Fa=[1,113],Na=[1,115],Oa=[1,116],Ka=[1,109],ya=[1,6,32,42,131,133,135,139,156],na=[2,27],ga=[1,123],Ha=[1,121],Aa=[1,6,31,32,40,41,42,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Wa=[2,94],b=[1,6,31,32,42,46,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],n=[2,73],oa=[1,128],f=[1,133],d=[1,134],wa=[1,136],La=[1,
6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],xa=[2,91],Gb=[1,6,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],$a=[2,63],Hb=[1,166],ab=[1,178],Va=[1,180],Ib=[1,175],Ma=[1,182],ub=[1,184],Ia=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,156,159,160,161,162,163,164,
165,166,167,168,169,170,171,172,173,174,175],Jb=[2,110],Kb=[1,6,31,32,40,41,42,58,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Lb=[1,6,31,32,40,41,42,46,58,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Mb=[40,41,114],Nb=[1,241],vb=[1,240],Ja=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156],Ea=[2,
71],Ob=[1,250],Ta=[6,31,32,65,70],hb=[6,31,32,55,65,70,73],bb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,164,166,167,168,169,170,171,172,173,174],Pb=[40,41,82,83,84,85,87,90,113,114],ib=[1,269],cb=[2,62],jb=[1,279],Xa=[1,281],wb=[1,286],db=[1,288],Qb=[2,187],xb=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],kb=[1,297],Pa=[6,31,32,70,115,120],
Rb=[1,6,31,32,40,41,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],Sb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,140,156],Ya=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,134,140,156],lb=[146,147,148],mb=[70,146,147,148],nb=[6,31,94],Tb=[1,311],za=[6,31,32,70,94],Ub=[6,31,32,58,70,94],yb=[6,31,32,55,58,70,94],Vb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,
140,156,159,160,166,167,168,169,170,171,172,173,174],Wb=[12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,89,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Xb=[2,176],Qa=[6,31,32],eb=[2,72],Yb=[1,323],Zb=[1,324],$b=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,128,131,133,134,135,139,140,151,153,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],ob=[32,151,153],ac=[1,6,32,42,65,70,73,89,94,115,120,122,131,134,140,156],pb=[1,350],zb=[1,356],
Ab=[1,6,32,42,131,156],fb=[2,86],qb=[1,367],rb=[1,368],bc=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,151,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Bb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,140,156],cc=[1,381],dc=[1,382],Cb=[6,31,32,94],ec=[6,31,32,70],Db=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],fc=[31,70],sb=[1,408],tb=[1,409],Eb=[1,415],Fb=[1,416],gc=
{trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,YieldReturn:9,Return:10,Comment:11,STATEMENT:12,Import:13,Export:14,Value:15,Invocation:16,Code:17,Operation:18,Assign:19,If:20,Try:21,While:22,For:23,Switch:24,Class:25,Throw:26,Yield:27,YIELD:28,FROM:29,Block:30,INDENT:31,OUTDENT:32,Identifier:33,IDENTIFIER:34,Property:35,PROPERTY:36,AlphaNumeric:37,NUMBER:38,String:39,STRING:40,STRING_START:41,STRING_END:42,Regex:43,REGEX:44,REGEX_START:45,REGEX_END:46,
Literal:47,JS:48,UNDEFINED:49,NULL:50,BOOL:51,INFINITY:52,NAN:53,Assignable:54,"\x3d":55,AssignObj:56,ObjAssignable:57,":":58,SimpleObjAssignable:59,ThisProperty:60,RETURN:61,HERECOMMENT:62,PARAM_START:63,ParamList:64,PARAM_END:65,FuncGlyph:66,"-\x3e":67,"\x3d\x3e":68,OptComma:69,",":70,Param:71,ParamVar:72,"...":73,Array:74,Object:75,Splat:76,SimpleAssignable:77,Accessor:78,Parenthetical:79,Range:80,This:81,".":82,"?.":83,"::":84,"?::":85,Index:86,INDEX_START:87,IndexValue:88,INDEX_END:89,INDEX_SOAK:90,
Slice:91,"{":92,AssignList:93,"}":94,CLASS:95,EXTENDS:96,IMPORT:97,ImportDefaultSpecifier:98,ImportNamespaceSpecifier:99,ImportSpecifierList:100,ImportSpecifier:101,AS:102,DEFAULT:103,IMPORT_ALL:104,EXPORT:105,ExportSpecifierList:106,EXPORT_ALL:107,ExportSpecifier:108,OptFuncExist:109,Arguments:110,Super:111,SUPER:112,FUNC_EXIST:113,CALL_START:114,CALL_END:115,ArgList:116,THIS:117,"@":118,"[":119,"]":120,RangeDots:121,"..":122,Arg:123,SimpleArgs:124,TRY:125,Catch:126,FINALLY:127,CATCH:128,THROW:129,
"(":130,")":131,WhileSource:132,WHILE:133,WHEN:134,UNTIL:135,Loop:136,LOOP:137,ForBody:138,FOR:139,BY:140,ForStart:141,ForSource:142,ForVariables:143,OWN:144,ForValue:145,FORIN:146,FOROF:147,FORFROM:148,SWITCH:149,Whens:150,ELSE:151,When:152,LEADING_WHEN:153,IfBlock:154,IF:155,POST_IF:156,UNARY:157,UNARY_MATH:158,"-":159,"+":160,"--":161,"++":162,"?":163,MATH:164,"**":165,SHIFT:166,COMPARE:167,"\x26":168,"^":169,"|":170,"\x26\x26":171,"||":172,"BIN?":173,RELATION:174,COMPOUND_ASSIGN:175,$accept:0,
$end:1},terminals_:{2:"error",6:"TERMINATOR",12:"STATEMENT",28:"YIELD",29:"FROM",31:"INDENT",32:"OUTDENT",34:"IDENTIFIER",36:"PROPERTY",38:"NUMBER",40:"STRING",41:"STRING_START",42:"STRING_END",44:"REGEX",45:"REGEX_START",46:"REGEX_END",48:"JS",49:"UNDEFINED",50:"NULL",51:"BOOL",52:"INFINITY",53:"NAN",55:"\x3d",58:":",61:"RETURN",62:"HERECOMMENT",63:"PARAM_START",65:"PARAM_END",67:"-\x3e",68:"\x3d\x3e",70:",",73:"...",82:".",83:"?.",84:"::",85:"?::",87:"INDEX_START",89:"INDEX_END",90:"INDEX_SOAK",
92:"{",94:"}",95:"CLASS",96:"EXTENDS",97:"IMPORT",102:"AS",103:"DEFAULT",104:"IMPORT_ALL",105:"EXPORT",107:"EXPORT_ALL",112:"SUPER",113:"FUNC_EXIST",114:"CALL_START",115:"CALL_END",117:"THIS",118:"@",119:"[",120:"]",122:"..",125:"TRY",127:"FINALLY",128:"CATCH",129:"THROW",130:"(",131:")",133:"WHILE",134:"WHEN",135:"UNTIL",137:"LOOP",139:"FOR",140:"BY",144:"OWN",146:"FORIN",147:"FOROF",148:"FORFROM",149:"SWITCH",151:"ELSE",153:"LEADING_WHEN",155:"IF",156:"POST_IF",157:"UNARY",158:"UNARY_MATH",159:"-",
160:"+",161:"--",162:"++",163:"?",164:"MATH",165:"**",166:"SHIFT",167:"COMPARE",168:"\x26",169:"^",170:"|",171:"\x26\x26",172:"||",173:"BIN?",174:"RELATION",175:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[8,1],[8,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[27,1],[27,2],[27,3],[30,2],[30,3],[33,1],[35,1],[37,1],[37,1],[39,1],[39,3],[43,1],[43,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[19,
3],[19,4],[19,5],[56,1],[56,3],[56,5],[56,3],[56,5],[56,1],[59,1],[59,1],[59,1],[57,1],[57,1],[10,2],[10,1],[9,3],[9,2],[11,1],[17,5],[17,2],[66,1],[66,1],[69,0],[69,1],[64,0],[64,1],[64,3],[64,4],[64,6],[71,1],[71,2],[71,3],[71,1],[72,1],[72,1],[72,1],[72,1],[76,2],[77,1],[77,2],[77,2],[77,1],[54,1],[54,1],[54,1],[15,1],[15,1],[15,1],[15,1],[15,1],[78,2],[78,2],[78,2],[78,2],[78,1],[78,1],[86,3],[86,2],[88,1],[88,1],[75,4],[93,0],[93,1],[93,3],[93,4],[93,6],[25,1],[25,2],[25,3],[25,4],[25,2],[25,
3],[25,4],[25,5],[13,2],[13,4],[13,4],[13,5],[13,7],[13,6],[13,9],[100,1],[100,3],[100,4],[100,4],[100,6],[101,1],[101,3],[101,1],[101,3],[98,1],[99,3],[14,3],[14,5],[14,2],[14,4],[14,5],[14,6],[14,3],[14,4],[14,7],[106,1],[106,3],[106,4],[106,4],[106,6],[108,1],[108,3],[108,3],[108,1],[108,3],[16,3],[16,3],[16,3],[16,1],[111,1],[111,2],[109,0],[109,1],[110,2],[110,4],[81,1],[81,1],[60,2],[74,2],[74,4],[121,1],[121,1],[80,5],[91,3],[91,2],[91,2],[91,1],[116,1],[116,3],[116,4],[116,4],[116,6],[123,
1],[123,1],[123,1],[124,1],[124,3],[21,2],[21,3],[21,4],[21,5],[126,3],[126,3],[126,2],[26,2],[79,3],[79,5],[132,2],[132,4],[132,2],[132,4],[22,2],[22,2],[22,2],[22,1],[136,2],[136,2],[23,2],[23,2],[23,2],[138,2],[138,4],[138,2],[141,2],[141,3],[145,1],[145,1],[145,1],[145,1],[143,1],[143,3],[142,2],[142,2],[142,4],[142,4],[142,4],[142,6],[142,6],[142,2],[142,4],[24,5],[24,7],[24,4],[24,6],[150,1],[150,2],[152,3],[152,4],[154,3],[154,5],[20,1],[20,3],[20,3],[20,3],[18,2],[18,2],[18,2],[18,2],[18,
2],[18,2],[18,2],[18,2],[18,2],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,5],[18,4],[18,3]],performAction:function(a,n,oa,b,c,f,d){a=f.length-1;switch(c){case 1:return this.$=b.addLocationDataFn(d[a],d[a])(new b.Block);case 2:return this.$=f[a];case 3:this.$=b.addLocationDataFn(d[a],d[a])(b.Block.wrap([f[a]]));break;case 4:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-2].push(f[a]));break;case 5:this.$=f[a-1];break;case 6:case 7:case 8:case 9:case 10:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 35:case 40:case 42:case 56:case 57:case 58:case 59:case 60:case 61:case 71:case 72:case 82:case 83:case 84:case 85:case 90:case 91:case 94:case 98:case 104:case 163:case 187:case 188:case 190:case 220:case 221:case 239:case 245:this.$=
f[a];break;case 11:this.$=b.addLocationDataFn(d[a],d[a])(new b.StatementLiteral(f[a]));break;case 27:this.$=b.addLocationDataFn(d[a],d[a])(new b.Op(f[a],new b.Value(new b.Literal(""))));break;case 28:case 249:case 250:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op(f[a-1],f[a]));break;case 29:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op(f[a-2].concat(f[a-1]),f[a]));break;case 30:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Block);break;case 31:case 105:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-
1]);break;case 32:this.$=b.addLocationDataFn(d[a],d[a])(new b.IdentifierLiteral(f[a]));break;case 33:this.$=b.addLocationDataFn(d[a],d[a])(new b.PropertyName(f[a]));break;case 34:this.$=b.addLocationDataFn(d[a],d[a])(new b.NumberLiteral(f[a]));break;case 36:this.$=b.addLocationDataFn(d[a],d[a])(new b.StringLiteral(f[a]));break;case 37:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.StringWithInterpolations(f[a-1]));break;case 38:this.$=b.addLocationDataFn(d[a],d[a])(new b.RegexLiteral(f[a]));break;
case 39:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.RegexWithInterpolations(f[a-1].args));break;case 41:this.$=b.addLocationDataFn(d[a],d[a])(new b.PassthroughLiteral(f[a]));break;case 43:this.$=b.addLocationDataFn(d[a],d[a])(new b.UndefinedLiteral);break;case 44:this.$=b.addLocationDataFn(d[a],d[a])(new b.NullLiteral);break;case 45:this.$=b.addLocationDataFn(d[a],d[a])(new b.BooleanLiteral(f[a]));break;case 46:this.$=b.addLocationDataFn(d[a],d[a])(new b.InfinityLiteral(f[a]));break;case 47:this.$=
b.addLocationDataFn(d[a],d[a])(new b.NaNLiteral);break;case 48:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(f[a-2],f[a]));break;case 49:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Assign(f[a-3],f[a]));break;case 50:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(f[a-4],f[a-1]));break;case 51:case 87:case 92:case 93:case 95:case 96:case 97:case 222:case 223:this.$=b.addLocationDataFn(d[a],d[a])(new b.Value(f[a]));break;case 52:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(b.addLocationDataFn(d[a-
2])(new b.Value(f[a-2])),f[a],"object",{operatorToken:b.addLocationDataFn(d[a-1])(new b.Literal(f[a-1]))}));break;case 53:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(b.addLocationDataFn(d[a-4])(new b.Value(f[a-4])),f[a-1],"object",{operatorToken:b.addLocationDataFn(d[a-3])(new b.Literal(f[a-3]))}));break;case 54:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(b.addLocationDataFn(d[a-2])(new b.Value(f[a-2])),f[a],null,{operatorToken:b.addLocationDataFn(d[a-1])(new b.Literal(f[a-1]))}));
break;case 55:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(b.addLocationDataFn(d[a-4])(new b.Value(f[a-4])),f[a-1],null,{operatorToken:b.addLocationDataFn(d[a-3])(new b.Literal(f[a-3]))}));break;case 62:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Return(f[a]));break;case 63:this.$=b.addLocationDataFn(d[a],d[a])(new b.Return);break;case 64:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.YieldReturn(f[a]));break;case 65:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.YieldReturn);break;case 66:this.$=
b.addLocationDataFn(d[a],d[a])(new b.Comment(f[a]));break;case 67:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Code(f[a-3],f[a],f[a-1]));break;case 68:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Code([],f[a],f[a-1]));break;case 69:this.$=b.addLocationDataFn(d[a],d[a])("func");break;case 70:this.$=b.addLocationDataFn(d[a],d[a])("boundfunc");break;case 73:case 110:this.$=b.addLocationDataFn(d[a],d[a])([]);break;case 74:case 111:case 130:case 150:case 182:case 224:this.$=b.addLocationDataFn(d[a],
d[a])([f[a]]);break;case 75:case 112:case 131:case 151:case 183:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-2].concat(f[a]));break;case 76:case 113:case 132:case 152:case 184:this.$=b.addLocationDataFn(d[a-3],d[a])(f[a-3].concat(f[a]));break;case 77:case 114:case 134:case 154:case 186:this.$=b.addLocationDataFn(d[a-5],d[a])(f[a-5].concat(f[a-2]));break;case 78:this.$=b.addLocationDataFn(d[a],d[a])(new b.Param(f[a]));break;case 79:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Param(f[a-1],null,!0));
break;case 80:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Param(f[a-2],f[a]));break;case 81:case 189:this.$=b.addLocationDataFn(d[a],d[a])(new b.Expansion);break;case 86:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Splat(f[a-1]));break;case 88:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a-1].add(f[a]));break;case 89:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Value(f[a-1],[].concat(f[a])));break;case 99:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Access(f[a]));break;case 100:this.$=b.addLocationDataFn(d[a-
1],d[a])(new b.Access(f[a],"soak"));break;case 101:this.$=b.addLocationDataFn(d[a-1],d[a])([b.addLocationDataFn(d[a-1])(new b.Access(new b.PropertyName("prototype"))),b.addLocationDataFn(d[a])(new b.Access(f[a]))]);break;case 102:this.$=b.addLocationDataFn(d[a-1],d[a])([b.addLocationDataFn(d[a-1])(new b.Access(new b.PropertyName("prototype"),"soak")),b.addLocationDataFn(d[a])(new b.Access(f[a]))]);break;case 103:this.$=b.addLocationDataFn(d[a],d[a])(new b.Access(new b.PropertyName("prototype")));
break;case 106:this.$=b.addLocationDataFn(d[a-1],d[a])(b.extend(f[a],{soak:!0}));break;case 107:this.$=b.addLocationDataFn(d[a],d[a])(new b.Index(f[a]));break;case 108:this.$=b.addLocationDataFn(d[a],d[a])(new b.Slice(f[a]));break;case 109:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Obj(f[a-2],f[a-3].generated));break;case 115:this.$=b.addLocationDataFn(d[a],d[a])(new b.Class);break;case 116:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Class(null,null,f[a]));break;case 117:this.$=b.addLocationDataFn(d[a-
2],d[a])(new b.Class(null,f[a]));break;case 118:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Class(null,f[a-1],f[a]));break;case 119:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Class(f[a]));break;case 120:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Class(f[a-1],null,f[a]));break;case 121:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Class(f[a-2],f[a]));break;case 122:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Class(f[a-3],f[a-1],f[a]));break;case 123:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.ImportDeclaration(null,
f[a]));break;case 124:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ImportDeclaration(new b.ImportClause(f[a-2],null),f[a]));break;case 125:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ImportDeclaration(new b.ImportClause(null,f[a-2]),f[a]));break;case 126:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ImportDeclaration(new b.ImportClause(null,new b.ImportSpecifierList([])),f[a]));break;case 127:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.ImportDeclaration(new b.ImportClause(null,new b.ImportSpecifierList(f[a-
4])),f[a]));break;case 128:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.ImportDeclaration(new b.ImportClause(f[a-4],f[a-2]),f[a]));break;case 129:this.$=b.addLocationDataFn(d[a-8],d[a])(new b.ImportDeclaration(new b.ImportClause(f[a-7],new b.ImportSpecifierList(f[a-4])),f[a]));break;case 133:case 153:case 169:case 185:this.$=b.addLocationDataFn(d[a-3],d[a])(f[a-2]);break;case 135:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportSpecifier(f[a]));break;case 136:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportSpecifier(f[a-
2],f[a]));break;case 137:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportSpecifier(new b.Literal(f[a])));break;case 138:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportSpecifier(new b.Literal(f[a-2]),f[a]));break;case 139:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportDefaultSpecifier(f[a]));break;case 140:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportNamespaceSpecifier(new b.Literal(f[a-2]),f[a]));break;case 141:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList([])));
break;case 142:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList(f[a-2])));break;case 143:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.ExportNamedDeclaration(f[a]));break;case 144:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ExportNamedDeclaration(new b.Assign(f[a-2],f[a],null,{moduleDeclaration:"export"})));break;case 145:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ExportNamedDeclaration(new b.Assign(f[a-3],f[a],null,{moduleDeclaration:"export"})));
break;case 146:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.ExportNamedDeclaration(new b.Assign(f[a-4],f[a-1],null,{moduleDeclaration:"export"})));break;case 147:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportDefaultDeclaration(f[a]));break;case 148:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ExportAllDeclaration(new b.Literal(f[a-2]),f[a]));break;case 149:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList(f[a-4]),f[a]));break;case 155:this.$=b.addLocationDataFn(d[a],
d[a])(new b.ExportSpecifier(f[a]));break;case 156:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(f[a-2],f[a]));break;case 157:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(f[a-2],new b.Literal(f[a])));break;case 158:this.$=b.addLocationDataFn(d[a],d[a])(new b.ExportSpecifier(new b.Literal(f[a])));break;case 159:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(new b.Literal(f[a-2]),f[a]));break;case 160:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.TaggedTemplateCall(f[a-
2],f[a],f[a-1]));break;case 161:case 162:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Call(f[a-2],f[a],f[a-1]));break;case 164:this.$=b.addLocationDataFn(d[a],d[a])(new b.SuperCall);break;case 165:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.SuperCall(f[a]));break;case 166:this.$=b.addLocationDataFn(d[a],d[a])(!1);break;case 167:this.$=b.addLocationDataFn(d[a],d[a])(!0);break;case 168:this.$=b.addLocationDataFn(d[a-1],d[a])([]);break;case 170:case 171:this.$=b.addLocationDataFn(d[a],d[a])(new b.Value(new b.ThisLiteral));
break;case 172:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Value(b.addLocationDataFn(d[a-1])(new b.ThisLiteral),[b.addLocationDataFn(d[a])(new b.Access(f[a]))],"this"));break;case 173:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Arr([]));break;case 174:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Arr(f[a-2]));break;case 175:this.$=b.addLocationDataFn(d[a],d[a])("inclusive");break;case 176:this.$=b.addLocationDataFn(d[a],d[a])("exclusive");break;case 177:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Range(f[a-
3],f[a-1],f[a-2]));break;case 178:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Range(f[a-2],f[a],f[a-1]));break;case 179:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Range(f[a-1],null,f[a]));break;case 180:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Range(null,f[a],f[a-1]));break;case 181:this.$=b.addLocationDataFn(d[a],d[a])(new b.Range(null,null,f[a]));break;case 191:this.$=b.addLocationDataFn(d[a-2],d[a])([].concat(f[a-2],f[a]));break;case 192:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Try(f[a]));
break;case 193:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Try(f[a-1],f[a][0],f[a][1]));break;case 194:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Try(f[a-2],null,null,f[a]));break;case 195:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Try(f[a-3],f[a-2][0],f[a-2][1],f[a]));break;case 196:this.$=b.addLocationDataFn(d[a-2],d[a])([f[a-1],f[a]]);break;case 197:this.$=b.addLocationDataFn(d[a-2],d[a])([b.addLocationDataFn(d[a-1])(new b.Value(f[a-1])),f[a]]);break;case 198:this.$=b.addLocationDataFn(d[a-
1],d[a])([null,f[a]]);break;case 199:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Throw(f[a]));break;case 200:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Parens(f[a-1]));break;case 201:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Parens(f[a-2]));break;case 202:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.While(f[a]));break;case 203:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.While(f[a-2],{guard:f[a]}));break;case 204:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.While(f[a],{invert:!0}));break;
case 205:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.While(f[a-2],{invert:!0,guard:f[a]}));break;case 206:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a-1].addBody(f[a]));break;case 207:case 208:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a].addBody(b.addLocationDataFn(d[a-1])(b.Block.wrap([f[a-1]]))));break;case 209:this.$=b.addLocationDataFn(d[a],d[a])(f[a]);break;case 210:this.$=b.addLocationDataFn(d[a-1],d[a])((new b.While(b.addLocationDataFn(d[a-1])(new b.BooleanLiteral("true")))).addBody(f[a]));
break;case 211:this.$=b.addLocationDataFn(d[a-1],d[a])((new b.While(b.addLocationDataFn(d[a-1])(new b.BooleanLiteral("true")))).addBody(b.addLocationDataFn(d[a])(b.Block.wrap([f[a]]))));break;case 212:case 213:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.For(f[a-1],f[a]));break;case 214:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.For(f[a],f[a-1]));break;case 215:this.$=b.addLocationDataFn(d[a-1],d[a])({source:b.addLocationDataFn(d[a])(new b.Value(f[a]))});break;case 216:this.$=b.addLocationDataFn(d[a-
3],d[a])({source:b.addLocationDataFn(d[a-2])(new b.Value(f[a-2])),step:f[a]});break;case 217:b=b.addLocationDataFn(d[a-1],d[a]);f[a].own=f[a-1].own;f[a].ownTag=f[a-1].ownTag;f[a].name=f[a-1][0];f[a].index=f[a-1][1];this.$=b(f[a]);break;case 218:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a]);break;case 219:c=b.addLocationDataFn(d[a-2],d[a]);f[a].own=!0;f[a].ownTag=b.addLocationDataFn(d[a-1])(new b.Literal(f[a-1]));this.$=c(f[a]);break;case 225:this.$=b.addLocationDataFn(d[a-2],d[a])([f[a-2],f[a]]);
break;case 226:this.$=b.addLocationDataFn(d[a-1],d[a])({source:f[a]});break;case 227:this.$=b.addLocationDataFn(d[a-1],d[a])({source:f[a],object:!0});break;case 228:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],guard:f[a]});break;case 229:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],guard:f[a],object:!0});break;case 230:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],step:f[a]});break;case 231:this.$=b.addLocationDataFn(d[a-5],d[a])({source:f[a-4],guard:f[a-2],step:f[a]});
break;case 232:this.$=b.addLocationDataFn(d[a-5],d[a])({source:f[a-4],step:f[a-2],guard:f[a]});break;case 233:this.$=b.addLocationDataFn(d[a-1],d[a])({source:f[a],from:!0});break;case 234:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],guard:f[a],from:!0});break;case 235:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Switch(f[a-3],f[a-1]));break;case 236:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.Switch(f[a-5],f[a-3],f[a-1]));break;case 237:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Switch(null,
f[a-1]));break;case 238:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.Switch(null,f[a-3],f[a-1]));break;case 240:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a-1].concat(f[a]));break;case 241:this.$=b.addLocationDataFn(d[a-2],d[a])([[f[a-1],f[a]]]);break;case 242:this.$=b.addLocationDataFn(d[a-3],d[a])([[f[a-2],f[a-1]]]);break;case 243:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.If(f[a-1],f[a],{type:f[a-2]}));break;case 244:this.$=b.addLocationDataFn(d[a-4],d[a])(f[a-4].addElse(b.addLocationDataFn(d[a-
2],d[a])(new b.If(f[a-1],f[a],{type:f[a-2]}))));break;case 246:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-2].addElse(f[a]));break;case 247:case 248:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.If(f[a],b.addLocationDataFn(d[a-2])(b.Block.wrap([f[a-2]])),{type:f[a-1],statement:!0}));break;case 251:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("-",f[a]));break;case 252:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("+",f[a]));break;case 253:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("--",
f[a]));break;case 254:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("++",f[a]));break;case 255:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("--",f[a-1],null,!0));break;case 256:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("++",f[a-1],null,!0));break;case 257:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Existence(f[a-1]));break;case 258:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op("+",f[a-2],f[a]));break;case 259:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op("-",f[a-2],f[a]));break;
case 260:case 261:case 262:case 263:case 264:case 265:case 266:case 267:case 268:case 269:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op(f[a-1],f[a-2],f[a]));break;case 270:d=b.addLocationDataFn(d[a-2],d[a]);f="!"===f[a-1].charAt(0)?(new b.Op(f[a-1].slice(1),f[a-2],f[a])).invert():new b.Op(f[a-1],f[a-2],f[a]);this.$=d(f);break;case 271:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(f[a-2],f[a],f[a-1]));break;case 272:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(f[a-4],f[a-1],f[a-3]));
break;case 273:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Assign(f[a-3],f[a],f[a-2]));break;case 274:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Extends(f[a-2],f[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:t,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{1:[3]},{1:[2,2],6:Ba},a(va,[2,3]),a(va,[2,6],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(va,[2,7],{141:77,132:105,138:106,133:C,135:A,139:D,156:Ca}),a(va,[2,8]),a(ta,[2,14],{109:107,78:108,86:114,40:ua,41:ua,114:ua,82:Ra,83:Ga,
84:Sa,85:Fa,87:Na,90:Oa,113:Ka}),a(ta,[2,15],{86:114,109:117,78:118,82:Ra,83:Ga,84:Sa,85:Fa,87:Na,90:Oa,113:Ka,114:ua}),a(ta,[2,16]),a(ta,[2,17]),a(ta,[2,18]),a(ta,[2,19]),a(ta,[2,20]),a(ta,[2,21]),a(ta,[2,22]),a(ta,[2,23]),a(ta,[2,24]),a(ta,[2,25]),a(ta,[2,26]),a(ya,[2,9]),a(ya,[2,10]),a(ya,[2,11]),a(ya,[2,12]),a(ya,[2,13]),a([1,6,32,42,131,133,135,139,156,163,164,165,166,167,168,169,170,171,172,173,174],na,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,
14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:c,28:ga,29:Ha,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:[1,119],62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(Aa,Wa,{55:[1,124]}),a(Aa,[2,95]),a(Aa,[2,96]),a(Aa,[2,97]),a(Aa,[2,98]),a(b,[2,163]),a([6,31,65,70],n,{64:125,71:126,72:127,33:129,
60:130,74:131,75:132,34:g,73:oa,92:r,118:f,119:d}),{30:135,31:wa},{7:137,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,
158:U,159:aa,160:J,161:ca,162:Q},{7:138,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},
{7:139,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:140,8:122,10:20,11:21,12:c,
13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{15:142,16:143,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,
44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:144,60:71,74:53,75:54,77:141,79:28,80:29,81:30,92:r,111:31,112:u,117:B,118:T,119:S,130:R},{15:142,16:143,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:144,60:71,74:53,75:54,77:145,79:28,80:29,81:30,92:r,111:31,112:u,117:B,118:T,119:S,130:R},a(La,xa,{96:[1,149],161:[1,146],162:[1,147],175:[1,148]}),a(ta,[2,245],{151:[1,150]}),{30:151,31:wa},{30:152,31:wa},a(ta,[2,209]),{30:153,31:wa},{7:154,8:122,10:20,
11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:[1,155],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Gb,[2,115],{47:27,79:28,80:29,81:30,
111:31,74:53,75:54,37:55,43:57,33:70,60:71,39:80,15:142,16:143,54:144,30:156,77:158,31:wa,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,92:r,96:[1,157],112:u,117:B,118:T,119:S,130:R}),{7:159,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,
105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ya,$a,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:160,12:c,28:ga,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,
68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a([1,6,31,32,42,70,94,131,133,135,139,156],[2,66]),{33:165,34:g,39:161,40:p,41:l,92:[1,164],98:162,99:163,104:Hb},{25:168,33:169,34:g,92:[1,167],95:h,103:[1,170],107:[1,171]},a(La,[2,92]),a(La,[2,93]),a(Aa,[2,40]),a(Aa,[2,41]),a(Aa,[2,42]),a(Aa,[2,43]),a(Aa,[2,44]),a(Aa,[2,45]),a(Aa,[2,46]),a(Aa,[2,47]),{4:172,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,
19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:t,31:[1,173],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:174,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,
22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,116:176,117:B,118:T,119:S,120:Ib,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Aa,[2,170]),a(Aa,[2,171],{35:181,36:Ma}),a([1,6,31,32,42,46,65,70,
73,82,83,84,85,87,89,90,94,113,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],[2,164],{110:183,114:ub}),{31:[2,69]},{31:[2,70]},a(Ia,[2,87]),a(Ia,[2,90]),{7:185,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,
95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:186,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,
117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:187,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,
130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:189,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,30:188,31:wa,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,
135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{33:194,34:g,60:195,74:196,75:197,80:190,92:r,118:f,119:S,143:191,144:[1,192],145:193},{142:198,146:[1,199],147:[1,200],148:[1,201]},a([6,31,70,94],Jb,{39:80,93:202,56:203,57:204,59:205,11:206,37:207,33:208,35:209,60:210,34:g,36:Ma,38:v,40:p,41:l,62:N,118:f}),a(Kb,[2,34]),a(Kb,[2,35]),a(Aa,[2,38]),{15:142,16:211,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,
54:144,60:71,74:53,75:54,77:212,79:28,80:29,81:30,92:r,111:31,112:u,117:B,118:T,119:S,130:R},a([1,6,29,31,32,40,41,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,102,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],[2,32]),a(Lb,[2,36]),{4:213,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:t,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,
48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(va,[2,5],{7:4,8:5,9:6,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,
37:55,43:57,33:70,60:71,141:77,39:80,5:214,12:c,28:t,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,133:C,135:A,137:W,139:D,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(ta,[2,257]),{7:215,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,
54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:216,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,
67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:217,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,
79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:218,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:219,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,
118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:220,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,
132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:221,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,
138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:222,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,
155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:223,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,
161:ca,162:Q},{7:224,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:225,8:122,10:20,
11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:226,8:122,10:20,11:21,12:c,13:23,14:24,15:7,
16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:227,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,
21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:228,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,
26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,208]),a(ta,[2,213]),{7:229,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,
26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,207]),a(ta,[2,212]),{39:230,40:p,41:l,110:231,114:ub},a(Ia,[2,88]),a(Mb,[2,167]),{35:232,36:Ma},{35:233,36:Ma},a(Ia,[2,103],{35:234,
36:Ma}),{35:235,36:Ma},a(Ia,[2,104]),{7:237,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Nb,74:53,75:54,77:40,79:28,80:29,81:30,88:236,91:238,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,121:239,122:vb,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,
157:Z,158:U,159:aa,160:J,161:ca,162:Q},{86:242,87:Na,90:Oa},{110:243,114:ub},a(Ia,[2,89]),a(va,[2,65],{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:244,12:c,28:ga,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,133:$a,
135:$a,139:$a,156:$a,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(Ja,[2,28],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:245,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,
92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{132:105,133:C,135:A,138:106,139:D,141:77,156:Ca},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,163,164,165,166,167,168,169,170,171,172,173,174],na,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,
154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:c,28:ga,29:Ha,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),{6:[1,247],7:246,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:[1,248],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,
44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a([6,31],Ea,{69:251,65:[1,249],70:Ob}),a(Ta,[2,74]),a(Ta,[2,78],{55:[1,253],73:[1,252]}),a(Ta,[2,81]),a(hb,[2,82]),a(hb,[2,83]),a(hb,[2,84]),a(hb,[2,85]),{35:181,36:Ma},{7:254,8:122,10:20,11:21,12:c,
13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,116:176,117:B,118:T,119:S,120:Ib,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,68]),{4:256,
5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:t,32:[1,255],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a([1,6,31,32,42,
65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,164,165,166,167,168,169,170,171,172,173,174],[2,249],{141:77,132:102,138:103,163:ea}),a(bb,[2,250],{141:77,132:102,138:103,163:ea,165:ia}),a(bb,[2,251],{141:77,132:102,138:103,163:ea,165:ia}),a(bb,[2,252],{141:77,132:102,138:103,163:ea,165:ia}),a(ta,[2,253],{40:xa,41:xa,82:xa,83:xa,84:xa,85:xa,87:xa,90:xa,113:xa,114:xa}),a(Mb,ua,{109:107,78:108,86:114,82:Ra,83:Ga,84:Sa,85:Fa,87:Na,90:Oa,113:Ka}),{78:118,82:Ra,83:Ga,84:Sa,85:Fa,86:114,
87:Na,90:Oa,109:117,113:Ka,114:ua},a(Pb,Wa),a(ta,[2,254],{40:xa,41:xa,82:xa,83:xa,84:xa,85:xa,87:xa,90:xa,113:xa,114:xa}),a(ta,[2,255]),a(ta,[2,256]),{6:[1,259],7:257,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:[1,258],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,
118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:260,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,
132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{30:261,31:wa,155:[1,262]},a(ta,[2,192],{126:263,127:[1,264],128:[1,265]}),a(ta,[2,206]),a(ta,[2,214]),{31:[1,266],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{150:267,152:268,153:ib},a(ta,[2,116]),{7:270,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,
24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Gb,[2,119],{30:271,31:wa,40:xa,41:xa,82:xa,83:xa,84:xa,85:xa,87:xa,90:xa,113:xa,114:xa,96:[1,272]}),a(Ja,[2,199],{141:77,
132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,cb,{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,[2,123]),{29:[1,273],70:[1,274]},{29:[1,275]},{31:jb,33:280,34:g,94:[1,276],100:277,101:278,103:Xa},a([29,70],[2,139]),{102:[1,282]},{31:wb,33:287,34:g,94:[1,283],103:db,106:284,108:285},a(ya,[2,143]),{55:[1,289]},{7:290,8:122,10:20,11:21,12:c,13:23,14:24,
15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{29:[1,291]},{6:Ba,131:[1,292]},{4:293,5:3,7:4,8:5,9:6,10:20,11:21,12:c,
13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:t,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a([6,31,70,120],Qb,{141:77,132:102,138:103,121:294,73:[1,295],
122:vb,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(xb,[2,173]),a([6,31,120],Ea,{69:296,70:kb}),a(Pa,[2,182]),{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,
92:r,95:h,97:y,105:O,111:31,112:u,116:298,117:B,118:T,119:S,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Pa,[2,188]),a(Pa,[2,189]),a(Rb,[2,172]),a(Rb,[2,33]),a(b,[2,165]),{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,
62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,115:[1,299],116:300,117:B,118:T,119:S,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{30:301,31:wa,132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(Sb,[2,202],{141:77,132:102,138:103,133:C,134:[1,302],135:A,
139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Sb,[2,204],{141:77,132:102,138:103,133:C,134:[1,303],135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,210]),a(Ya,[2,211],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,156,
159,160,163,164,165,166,167,168,169,170,171,172,173,174],[2,215],{140:[1,304]}),a(lb,[2,218]),{33:194,34:g,60:195,74:196,75:197,92:r,118:f,119:d,143:305,145:193},a(lb,[2,224],{70:[1,306]}),a(mb,[2,220]),a(mb,[2,221]),a(mb,[2,222]),a(mb,[2,223]),a(ta,[2,217]),{7:307,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,
67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:308,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,
79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:309,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(nb,Ea,{69:310,70:Tb}),a(za,[2,111]),a(za,[2,51],{58:[1,312]}),a(Ub,[2,60],{55:[1,313]}),a(za,[2,56]),a(Ub,[2,61]),a(yb,[2,57]),a(yb,[2,58]),a(yb,[2,59]),{46:[1,314],78:118,82:Ra,83:Ga,84:Sa,85:Fa,86:114,87:Na,90:Oa,109:117,113:Ka,114:ua},a(Pb,xa),{6:Ba,42:[1,315]},a(va,[2,4]),a(Vb,[2,258],{141:77,132:102,138:103,163:ea,164:ha,
165:ia}),a(Vb,[2,259],{141:77,132:102,138:103,163:ea,164:ha,165:ia}),a(bb,[2,260],{141:77,132:102,138:103,163:ea,165:ia}),a(bb,[2,261],{141:77,132:102,138:103,163:ea,165:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,166,167,168,169,170,171,172,173,174],[2,262],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173],[2,263],{141:77,132:102,138:103,159:ja,160:da,163:ea,
164:ha,165:ia,166:ka,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,168,169,170,171,172,173],[2,264],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,169,170,171,172,173],[2,265],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,170,171,172,173],[2,266],{141:77,
132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,171,172,173],[2,267],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,172,173],[2,268],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,174:ma}),a([1,6,31,32,42,65,70,73,
89,94,115,120,122,131,133,134,135,139,140,156,173],[2,269],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,174:ma}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173,174],[2,270],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka}),a(Ya,[2,248],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),
a(Ya,[2,247],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(b,[2,160]),a(b,[2,161]),a(Ia,[2,99]),a(Ia,[2,100]),a(Ia,[2,101]),a(Ia,[2,102]),{89:[1,316]},{73:Nb,89:[2,107],121:317,122:vb,132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{89:[2,108]},{7:318,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,
19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,181],92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Wb,[2,175]),a(Wb,Xb),a(Ia,[2,106]),a(b,[2,162]),a(va,[2,64],{141:77,132:102,138:103,
133:cb,135:cb,139:cb,156:cb,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,29],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,48],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:319,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,
27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:320,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,
38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{66:321,67:m,68:q},a(Qa,eb,{72:127,33:129,60:130,74:131,75:132,71:322,34:g,73:oa,92:r,118:f,119:d}),{6:Yb,31:Zb},a(Ta,[2,79]),{7:325,8:122,10:20,11:21,12:c,13:23,14:24,
15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Pa,Qb,{141:77,132:102,138:103,73:[1,326],133:C,135:A,139:D,156:pa,159:ja,
160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a($b,[2,30]),{6:Ba,32:[1,327]},a(Ja,[2,271],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:328,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,
67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:329,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,
79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Ja,[2,274],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,246]),{7:330,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,
41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,193],{127:[1,331]}),{30:332,31:wa},{30:335,31:wa,33:333,34:g,75:334,92:r},{150:336,152:268,153:ib},{32:[1,337],151:[1,338],152:339,153:ib},a(ob,[2,239]),{7:341,8:122,10:20,11:21,
12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,124:340,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ac,[2,117],{141:77,132:102,138:103,30:342,31:wa,
133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,120]),{7:343,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,
135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{39:344,40:p,41:l},{92:[1,346],99:345,104:Hb},{39:347,40:p,41:l},{29:[1,348]},a(nb,Ea,{69:349,70:pb}),a(za,[2,130]),{31:jb,33:280,34:g,100:351,101:278,103:Xa},a(za,[2,135],{102:[1,352]}),a(za,[2,137],{102:[1,353]}),{33:354,34:g},a(ya,[2,141]),a(nb,Ea,{69:355,70:zb}),a(za,[2,150]),{31:wb,33:287,34:g,103:db,106:357,108:285},a(za,[2,155],{102:[1,358]}),a(za,[2,158],{102:[1,359]}),{6:[1,361],7:360,8:122,10:20,
11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:[1,362],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Ab,[2,147],{141:77,132:102,138:103,
133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{39:363,40:p,41:l},a(Aa,[2,200]),{6:Ba,32:[1,364]},{7:365,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,
119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a([12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Xb,{6:fb,31:fb,70:fb,120:fb}),{6:qb,31:rb,120:[1,366]},a([6,31,32,115,120],eb,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,
77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,76:179,7:254,123:369,12:c,28:ga,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,73:Va,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,133:C,135:A,137:W,139:D,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(Qa,Ea,{69:370,70:kb}),a(b,[2,168]),a([6,31,115],Ea,{69:371,70:kb}),a(bc,[2,243]),{7:372,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:373,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,
25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:374,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,
34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(lb,[2,219]),{33:194,34:g,60:195,74:196,75:197,92:r,118:f,119:d,145:375},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,156],[2,226],{141:77,132:102,
138:103,134:[1,376],140:[1,377],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Bb,[2,227],{141:77,132:102,138:103,134:[1,378],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Bb,[2,233],{141:77,132:102,138:103,134:[1,379],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{6:cc,31:dc,94:[1,380]},a(Cb,eb,{39:80,57:204,59:205,11:206,37:207,33:208,35:209,
60:210,56:383,34:g,36:Ma,38:v,40:p,41:l,62:N,118:f}),{7:384,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:[1,385],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,
158:U,159:aa,160:J,161:ca,162:Q},{7:386,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:[1,387],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,
161:ca,162:Q},a(Aa,[2,39]),a(Lb,[2,37]),a(Ia,[2,105]),{7:388,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,179],92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,
158:U,159:aa,160:J,161:ca,162:Q},{89:[2,180],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(Ja,[2,49],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{32:[1,389],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{30:390,31:wa},a(Ta,
[2,75]),{33:129,34:g,60:130,71:391,72:127,73:oa,74:131,75:132,92:r,118:f,119:d},a(ec,n,{71:126,72:127,33:129,60:130,74:131,75:132,64:392,34:g,73:oa,92:r,118:f,119:d}),a(Ta,[2,80],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Pa,fb),a($b,[2,31]),{32:[1,393],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},
a(Ja,[2,273],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{30:394,31:wa,132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{30:395,31:wa},a(ta,[2,194]),{30:396,31:wa},{30:397,31:wa},a(Db,[2,198]),{32:[1,398],151:[1,399],152:339,153:ib},a(ta,[2,237]),{30:400,31:wa},a(ob,[2,240]),{30:401,31:wa,70:[1,402]},a(fc,[2,190],{141:77,132:102,
138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,118]),a(ac,[2,121],{141:77,132:102,138:103,30:403,31:wa,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,[2,124]),{29:[1,404]},{31:jb,33:280,34:g,100:405,101:278,103:Xa},a(ya,[2,125]),{39:406,40:p,41:l},{6:sb,31:tb,94:[1,407]},a(Cb,eb,{33:280,101:410,34:g,103:Xa}),a(Qa,Ea,{69:411,70:pb}),{33:412,
34:g},{33:413,34:g},{29:[2,140]},{6:Eb,31:Fb,94:[1,414]},a(Cb,eb,{33:287,108:417,34:g,103:db}),a(Qa,Ea,{69:418,70:zb}),{33:419,34:g,103:[1,420]},{33:421,34:g},a(Ab,[2,144],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:422,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,
50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:423,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,
61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ya,[2,148]),{131:[1,424]},{120:[1,425],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(xb,[2,174]),{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,
18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,123:426,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,116:427,117:B,118:T,119:S,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Pa,[2,183]),{6:qb,31:rb,32:[1,428]},{6:qb,31:rb,115:[1,429]},
a(Ya,[2,203],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ya,[2,205],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ya,[2,216],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(lb,[2,225]),{7:430,8:122,10:20,11:21,12:c,
13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:431,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,
19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:432,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,
24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:433,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,
33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(xb,[2,109]),{11:206,33:208,34:g,35:209,36:Ma,37:207,38:v,39:80,40:p,41:l,56:434,57:204,59:205,60:210,62:N,118:f},a(ec,Jb,{39:80,56:203,57:204,59:205,
11:206,37:207,33:208,35:209,60:210,93:435,34:g,36:Ma,38:v,40:p,41:l,62:N,118:f}),a(za,[2,112]),a(za,[2,52],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:436,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,
68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(za,[2,54],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:437,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,
33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{89:[2,178],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},
a(ta,[2,50]),a(ta,[2,67]),a(Ta,[2,76]),a(Qa,Ea,{69:438,70:Ob}),a(ta,[2,272]),a(bc,[2,244]),a(ta,[2,195]),a(Db,[2,196]),a(Db,[2,197]),a(ta,[2,235]),{30:439,31:wa},{32:[1,440]},a(ob,[2,241],{6:[1,441]}),{7:442,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,122]),{39:443,40:p,41:l},a(nb,Ea,{69:444,70:pb}),a(ya,[2,126]),{29:[1,445]},{33:280,34:g,101:446,103:Xa},{31:jb,33:280,34:g,100:447,101:278,103:Xa},a(za,[2,131]),{6:sb,31:tb,32:[1,448]},a(za,[2,136]),a(za,[2,138]),a(ya,[2,142],{29:[1,449]}),{33:287,34:g,103:db,108:450},{31:wb,33:287,34:g,103:db,106:451,108:285},a(za,[2,151]),
{6:Eb,31:Fb,32:[1,452]},a(za,[2,156]),a(za,[2,157]),a(za,[2,159]),a(Ab,[2,145],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{32:[1,453],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(Aa,[2,201]),a(Aa,[2,177]),a(Pa,[2,184]),a(Qa,Ea,{69:454,70:kb}),a(Pa,[2,185]),a(b,[2,169]),a([1,6,31,32,42,65,70,73,89,94,115,
120,122,131,133,134,135,139,156],[2,228],{141:77,132:102,138:103,140:[1,455],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Bb,[2,230],{141:77,132:102,138:103,134:[1,456],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,229],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,234],{141:77,132:102,138:103,159:ja,
160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(za,[2,113]),a(Qa,Ea,{69:457,70:Tb}),{32:[1,458],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{32:[1,459],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{6:Yb,31:Zb,32:[1,460]},{32:[1,461]},a(ta,[2,238]),a(ob,[2,
242]),a(fc,[2,191],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,[2,128]),{6:sb,31:tb,94:[1,462]},{39:463,40:p,41:l},a(za,[2,132]),a(Qa,Ea,{69:464,70:pb}),a(za,[2,133]),{39:465,40:p,41:l},a(za,[2,152]),a(Qa,Ea,{69:466,70:zb}),a(za,[2,153]),a(ya,[2,146]),{6:qb,31:rb,32:[1,467]},{7:468,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,
28:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:469,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ga,33:70,34:g,37:55,38:v,
39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{6:cc,31:dc,32:[1,470]},a(za,[2,53]),a(za,[2,55]),a(Ta,[2,77]),a(ta,[2,236]),{29:[1,471]},a(ya,[2,127]),{6:sb,31:tb,32:[1,472]},a(ya,[2,149]),{6:Eb,31:Fb,32:[1,473]},a(Pa,[2,
186]),a(Ja,[2,231],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,232],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(za,[2,114]),{39:474,40:p,41:l},a(za,[2,134]),a(za,[2,154]),a(ya,[2,129])],defaultActions:{68:[2,69],69:[2,70],238:[2,108],354:[2,140]},parseError:function(a,b){if(b.recoverable)this.trace(a);else{var d=function(a,b){this.message=
a;this.hash=b};d.prototype=Error;throw new d(a,b);}},parse:function(a){var b=[0],d=[null],f=[],n=this.table,oa="",c=0,g=0,e=0,h=f.slice.call(arguments,1),wa=Object.create(this.lexer),La={},k;for(k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(La[k]=this.yy[k]);wa.setInput(a,La);La.lexer=wa;La.parser=this;"undefined"==typeof wa.yylloc&&(wa.yylloc={});k=wa.yylloc;f.push(k);var m=wa.options&&wa.options.ranges;this.parseError="function"===typeof La.parseError?La.parseError:Object.getPrototypeOf(this).parseError;
for(var q,Wa,p,r,y={},l,u;;){p=b[b.length-1];if(this.defaultActions[p])r=this.defaultActions[p];else{if(null===q||"undefined"==typeof q)q=wa.lex()||1,"number"!==typeof q&&(q=this.symbols_[q]||q);r=n[p]&&n[p][q]}if("undefined"===typeof r||!r.length||!r[0]){var xa;u=[];for(l in n[p])this.terminals_[l]&&2<l&&u.push("'"+this.terminals_[l]+"'");xa=wa.showPosition?"Parse error on line "+(c+1)+":\n"+wa.showPosition()+"\nExpecting "+u.join(", ")+", got '"+(this.terminals_[q]||q)+"'":"Parse error on line "+
(c+1)+": Unexpected "+(1==q?"end of input":"'"+(this.terminals_[q]||q)+"'");this.parseError(xa,{text:wa.match,token:this.terminals_[q]||q,line:wa.yylineno,loc:k,expected:u})}if(r[0]instanceof Array&&1<r.length)throw Error("Parse Error: multiple actions possible at state: "+p+", token: "+q);switch(r[0]){case 1:b.push(q);d.push(wa.yytext);f.push(wa.yylloc);b.push(r[1]);q=null;Wa?(q=Wa,Wa=null):(g=wa.yyleng,oa=wa.yytext,c=wa.yylineno,k=wa.yylloc,0<e&&e--);break;case 2:u=this.productions_[r[1]][1];y.$=
d[d.length-u];y._$={first_line:f[f.length-(u||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(u||1)].first_column,last_column:f[f.length-1].last_column};m&&(y._$.range=[f[f.length-(u||1)].range[0],f[f.length-1].range[1]]);p=this.performAction.apply(y,[oa,g,c,La,r[1],d,f].concat(h));if("undefined"!==typeof p)return p;u&&(b=b.slice(0,-2*u),d=d.slice(0,-1*u),f=f.slice(0,-1*u));b.push(this.productions_[r[1]][0]);d.push(y.$);f.push(y._$);r=n[b[b.length-2]][b[b.length-1]];b.push(r);
break;case 3:return!0}}}};e.prototype=gc;gc.Parser=e;return new e}();"undefined"!==typeof t&&"undefined"!==typeof e&&(e.parser=Ba,e.Parser=Ba.Parser,e.parse=function(){return Ba.parse.apply(Ba,arguments)},e.main=function(V){V[1]||(console.log("Usage: "+V[0]+" FILE"),process.exit(1));var a="",c=t("fs");"undefined"!==typeof c&&null!==c&&(a=c.readFileSync(t("path").normalize(V[1]),"utf8"));return e.parser.parse(a)},"undefined"!==typeof va&&t.main===va&&e.main(process.argv.slice(1)));return va.exports}();
t["./scope"]=function(){var e={};(function(){var t=[].indexOf||function(e){for(var V=0,a=this.length;V<a;V++)if(V in this&&this[V]===e)return V;return-1};e.Scope=function(){function e(e,a,c,t){var g,V;this.parent=e;this.expressions=a;this.method=c;this.referencedVars=t;this.variables=[{name:"arguments",type:"arguments"}];this.positions={};this.parent||(this.utilities={});this.root=null!=(g=null!=(V=this.parent)?V.root:void 0)?g:this}e.prototype.add=function(e,a,c){return this.shared&&!c?this.parent.add(e,
a,c):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=a:this.positions[e]=this.variables.push({name:e,type:a})-1};e.prototype.namedMethod=function(){var e;return null!=(e=this.method)&&e.name||!this.parent?this.method:this.parent.namedMethod()};e.prototype.find=function(e,a){null==a&&(a="var");if(this.check(e))return!0;this.add(e,a);return!1};e.prototype.parameter=function(e){if(!this.shared||!this.parent.check(e,!0))return this.add(e,"param")};e.prototype.check=
function(e){var a;return!!(this.type(e)||null!=(a=this.parent)&&a.check(e))};e.prototype.temporary=function(e,a,c){null==c&&(c=!1);return c?(c=e.charCodeAt(0),e=122-c,c=String.fromCharCode(c+a%(e+1)),a=Math.floor(a/(e+1)),""+c+(a||"")):""+e+(a||"")};e.prototype.type=function(e){var a,c,t,g;t=this.variables;a=0;for(c=t.length;a<c;a++)if(g=t[a],g.name===e)return g.type;return null};e.prototype.freeVariable=function(e,a){var c,V,g;null==a&&(a={});for(c=0;;){g=this.temporary(e,c,a.single);if(!(this.check(g)||
0<=t.call(this.root.referencedVars,g)))break;c++}(null!=(V=a.reserve)?V:1)&&this.add(g,"var",!0);return g};e.prototype.assign=function(e,a){this.add(e,{value:a,assigned:!0},!0);return this.hasAssignments=!0};e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length};e.prototype.declaredVariables=function(){var e,a,c,t,g;t=this.variables;g=[];a=0;for(c=t.length;a<c;a++)e=t[a],"var"===e.type&&g.push(e.name);return g.sort()};e.prototype.assignedVariables=function(){var e,a,c,t,g;
c=this.variables;t=[];e=0;for(a=c.length;e<a;e++)g=c[e],g.type.assigned&&t.push(g.name+" \x3d "+g.type.value);return t};return e}()}).call(this);return e}();t["./nodes"]=function(){var e={};(function(){var va,pa,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E,N,k,m,q,r,h,y,O,u,B,T,S,H,ba,R,C,A,W,D,P,Y,Z,U,aa,J,ca,Q,ua,Za,Ua,ja,da,ea,ha,ia,ka,la,L,fa,qa,ra,X,sa,ma,Ca,ta,gb,Ra,Ga,Sa,Fa,Na,Oa,Ka,ya,na=function(a,b){function n(){this.constructor=a}for(var oa in b)ga.call(b,oa)&&(a[oa]=b[oa]);n.prototype=b.prototype;
a.prototype=new n;a.__super__=b.prototype;return a},ga={}.hasOwnProperty,Ha=[].indexOf||function(a){for(var b=0,n=this.length;b<n;b++)if(b in this&&this[b]===a)return b;return-1},Aa=[].slice;Error.stackTraceLimit=Infinity;J=t("./scope").Scope;a=t("./lexer");Ga=a.isUnassignable;m=a.JS_FORBIDDEN;w=t("./helpers");ra=w.compact;ma=w.flatten;sa=w.extend;Fa=w.merge;X=w.del;a=w.addLocationDataFn;Sa=w.locationDataToString;Oa=w.throwSyntaxError;e.extend=sa;e.addLocationDataFn=a;fa=function(){return!0};H=function(){return!1};
ea=function(){return this};S=function(){this.negated=!this.negated;return this};e.CodeFragment=l=function(){function a(a,n){var b;this.code=""+n;this.locationData=null!=a?a.locationData:void 0;this.type=(null!=a?null!=(b=a.constructor)?b.name:void 0:void 0)||"unknown"}a.prototype.toString=function(){return""+this.code+(this.locationData?": "+Sa(this.locationData):"")};return a}();Ca=function(a){var b,n,oa,f;f=[];n=0;for(oa=a.length;n<oa;n++)b=a[n],f.push(b.code);return f.join("")};e.Base=a=function(){function a(){}
a.prototype.compile=function(a,n){return Ca(this.compileToFragments(a,n))};a.prototype.compileToFragments=function(a,n){a=sa({},a);n&&(a.level=n);n=this.unfoldSoak(a)||this;n.tab=a.indent;return a.level!==u&&n.isStatement(a)?n.compileClosure(a):n.compileNode(a)};a.prototype.compileClosure=function(a){var b,oa,f,d;(f=this.jumps())&&f.error("cannot use a pure statement in an expression");a.sharedScope=!0;f=new p([],c.wrap([this]));b=[];if((oa=this.contains(gb))||this.contains(Ra))b=[new ha],oa?(oa=
"apply",b.push(new z("arguments"))):oa="call",f=new L(f,[new va(new P(oa))]);a=(new g(f,b)).compileNode(a);if(f.isGenerator||null!=(d=f.base)&&d.isGenerator)a.unshift(this.makeCode("(yield* ")),a.push(this.makeCode(")"));return a};a.prototype.cache=function(a,n,oa){var b;if(null!=oa?oa(this):this.isComplex())return oa=new z(a.scope.freeVariable("ref")),b=new V(oa,this),n?[b.compileToFragments(a,n),[this.makeCode(oa.value)]]:[b,oa];oa=n?this.compileToFragments(a,n):this;return[oa,oa]};a.prototype.cacheToCodeFragments=
function(a){return[Ca(a[0]),Ca(a[1])]};a.prototype.makeReturn=function(a){var b;b=this.unwrapAll();return a?new g(new B(a+".push"),[b]):new U(b)};a.prototype.contains=function(a){var b;b=void 0;this.traverseChildren(!1,function(n){if(a(n))return b=n,!1});return b};a.prototype.lastNonComment=function(a){var b;for(b=a.length;b--;)if(!(a[b]instanceof G))return a[b];return null};a.prototype.toString=function(a,n){var b;null==a&&(a="");null==n&&(n=this.constructor.name);b="\n"+a+n;this.soak&&(b+="?");
this.eachChild(function(f){return b+=f.toString(a+da)});return b};a.prototype.eachChild=function(a){var b,oa,f,d,c,e,g;if(!this.children)return this;e=this.children;oa=0;for(d=e.length;oa<d;oa++)if(b=e[oa],this[b])for(g=ma([this[b]]),f=0,c=g.length;f<c;f++)if(b=g[f],!1===a(b))return this;return this};a.prototype.traverseChildren=function(a,n){return this.eachChild(function(b){if(!1!==n(b))return b.traverseChildren(a,n)})};a.prototype.invert=function(){return new A("!",this)};a.prototype.unwrapAll=
function(){var a;for(a=this;a!==(a=a.unwrap()););return a};a.prototype.children=[];a.prototype.isStatement=H;a.prototype.jumps=H;a.prototype.isComplex=fa;a.prototype.isChainable=H;a.prototype.isAssignable=H;a.prototype.isNumber=H;a.prototype.unwrap=ea;a.prototype.unfoldSoak=H;a.prototype.assigns=H;a.prototype.updateLocationDataIfMissing=function(a){if(this.locationData)return this;this.locationData=a;return this.eachChild(function(b){return b.updateLocationDataIfMissing(a)})};a.prototype.error=function(a){return Oa(a,
this.locationData)};a.prototype.makeCode=function(a){return new l(this,a)};a.prototype.wrapInBraces=function(a){return[].concat(this.makeCode("("),a,this.makeCode(")"))};a.prototype.joinFragmentArrays=function(a,n){var b,f,d,c,e;b=[];d=c=0;for(e=a.length;c<e;d=++c)f=a[d],d&&b.push(this.makeCode(n)),b=b.concat(f);return b};return a}();e.Block=c=function(a){function b(a){this.expressions=ra(ma(a||[]))}na(b,a);b.prototype.children=["expressions"];b.prototype.push=function(a){this.expressions.push(a);
return this};b.prototype.pop=function(){return this.expressions.pop()};b.prototype.unshift=function(a){this.expressions.unshift(a);return this};b.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this};b.prototype.isEmpty=function(){return!this.expressions.length};b.prototype.isStatement=function(a){var b,f,d,n;n=this.expressions;f=0;for(d=n.length;f<d;f++)if(b=n[f],b.isStatement(a))return!0;return!1};b.prototype.jumps=function(a){var b,f,d,n;n=this.expressions;f=
0;for(d=n.length;f<d;f++)if(b=n[f],b=b.jumps(a))return b};b.prototype.makeReturn=function(a){var b,f;for(f=this.expressions.length;f--;)if(b=this.expressions[f],!(b instanceof G)){this.expressions[f]=b.makeReturn(a);b instanceof U&&!b.expression&&this.expressions.splice(f,1);break}return this};b.prototype.compileToFragments=function(a,oa){null==a&&(a={});return a.scope?b.__super__.compileToFragments.call(this,a,oa):this.compileRoot(a)};b.prototype.compileNode=function(a){var n,f,d,c,e,g,k;this.tab=
a.indent;k=a.level===u;f=[];g=this.expressions;d=n=0;for(c=g.length;n<c;d=++n)e=g[d],e=e.unwrapAll(),e=e.unfoldSoak(a)||e,e instanceof b?f.push(e.compileNode(a)):k?(e.front=!0,d=e.compileToFragments(a),e.isStatement(a)||(d.unshift(this.makeCode(""+this.tab)),d.push(this.makeCode(";"))),f.push(d)):f.push(e.compileToFragments(a,h));if(k)return this.spaced?[].concat(this.joinFragmentArrays(f,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(f,"\n");n=f.length?this.joinFragmentArrays(f,", "):[this.makeCode("void 0")];
return 1<f.length&&a.level>=h?this.wrapInBraces(n):n};b.prototype.compileRoot=function(a){var b,f,d,n,c;a.indent=a.bare?"":da;a.level=u;this.spaced=!0;a.scope=new J(null,this,null,null!=(d=a.referencedVars)?d:[]);c=a.locals||[];d=0;for(f=c.length;d<f;d++)n=c[d],a.scope.parameter(n);d=[];if(!a.bare){var e;e=this.expressions;f=[];b=n=0;for(c=e.length;n<c;b=++n){b=e[b];if(!(b.unwrap()instanceof G))break;f.push(b)}n=this.expressions.slice(f.length);this.expressions=f;f.length&&(d=this.compileNode(Fa(a,
{indent:""})),d.push(this.makeCode("\n")));this.expressions=n}f=this.compileWithDeclarations(a);return a.bare?f:[].concat(d,this.makeCode("(function() {\n"),f,this.makeCode("\n}).call(this);\n"))};b.prototype.compileWithDeclarations=function(a){var b,f,d,n,c,e;d=[];e=this.expressions;n=c=0;for(b=e.length;c<b&&(f=e[n],f=f.unwrap(),f instanceof G||f instanceof B);n=++c);a=Fa(a,{level:u});n&&(f=this.expressions.splice(n,9E9),d=[this.spaced,!1],c=d[0],this.spaced=d[1],c=[this.compileNode(a),c],d=c[0],
this.spaced=c[1],this.expressions=f);f=this.compileNode(a);c=a.scope;c.expressions===this&&(b=a.scope.hasDeclarations(),a=c.hasAssignments,b||a?(n&&d.push(this.makeCode("\n")),d.push(this.makeCode(this.tab+"var ")),b&&d.push(this.makeCode(c.declaredVariables().join(", "))),a&&(b&&d.push(this.makeCode(",\n"+(this.tab+da))),d.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+da))))),d.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):d.length&&f.length&&d.push(this.makeCode("\n")));return d.concat(f)};
b.wrap=function(a){return 1===a.length&&a[0]instanceof b?a[0]:new b(a)};return b}(a);e.Literal=B=function(a){function b(a){this.value=a}na(b,a);b.prototype.isComplex=H;b.prototype.assigns=function(a){return a===this.value};b.prototype.compileNode=function(a){return[this.makeCode(this.value)]};b.prototype.toString=function(){return" "+(this.isStatement()?b.__super__.toString.apply(this,arguments):this.constructor.name)+": "+this.value};return b}(a);e.NumberLiteral=R=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(B);e.InfinityLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(){return[this.makeCode("2e308")]};return b}(R);e.NaNLiteral=function(a){function b(){b.__super__.constructor.call(this,"NaN")}na(b,a);b.prototype.compileNode=function(a){var b;b=[this.makeCode("0/0")];return a.level>=y?this.wrapInBraces(b):b};return b}(R);e.StringLiteral=Za=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(B);e.RegexLiteral=Z=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(B);e.PassthroughLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(B);e.IdentifierLiteral=z=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isAssignable=fa;return b}(B);e.PropertyName=P=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);b.prototype.isAssignable=fa;return b}(B);e.StatementLiteral=ua=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isStatement=fa;b.prototype.makeReturn=ea;b.prototype.jumps=function(a){if("break"===this.value&&!(null!=a&&a.loop||null!=a&&a.block)||"continue"===this.value&&(null==a||!a.loop))return this};b.prototype.compileNode=function(a){return[this.makeCode(""+this.tab+this.value+";")]};return b}(B);e.ThisLiteral=ha=function(a){function b(){b.__super__.constructor.call(this,
"this")}na(b,a);b.prototype.compileNode=function(a){var b;a=null!=(b=a.scope.method)&&b.bound?a.scope.method.context:this.value;return[this.makeCode(a)]};return b}(B);e.UndefinedLiteral=la=function(a){function b(){b.__super__.constructor.call(this,"undefined")}na(b,a);b.prototype.compileNode=function(a){return[this.makeCode(a.level>=q?"(void 0)":"void 0")]};return b}(B);e.NullLiteral=ba=function(a){function b(){b.__super__.constructor.call(this,"null")}na(b,a);return b}(B);e.BooleanLiteral=Da=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(B);e.Return=U=function(a){function b(a){this.expression=a}na(b,a);b.prototype.children=["expression"];b.prototype.isStatement=fa;b.prototype.makeReturn=ea;b.prototype.jumps=ea;b.prototype.compileToFragments=function(a,oa){var f,d;f=null!=(d=this.expression)?d.makeReturn():void 0;return!f||f instanceof b?b.__super__.compileToFragments.call(this,a,oa):f.compileToFragments(a,oa)};b.prototype.compileNode=function(a){var b;b=[];b.push(this.makeCode(this.tab+("return"+(this.expression?
" ":""))));this.expression&&(b=b.concat(this.expression.compileToFragments(a,O)));b.push(this.makeCode(";"));return b};return b}(a);e.YieldReturn=qa=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){null==a.scope.parent&&this.error("yield can only occur inside functions");return b.__super__.compileNode.apply(this,arguments)};return b}(U);e.Value=L=function(a){function b(a,oa,f){if(!oa&&a instanceof b)return a;this.base=a;this.properties=
oa||[];f&&(this[f]=!0);return this}na(b,a);b.prototype.children=["base","properties"];b.prototype.add=function(a){this.properties=this.properties.concat(a);return this};b.prototype.hasProperties=function(){return!!this.properties.length};b.prototype.bareLiteral=function(a){return!this.properties.length&&this.base instanceof a};b.prototype.isArray=function(){return this.bareLiteral(pa)};b.prototype.isRange=function(){return this.bareLiteral(Y)};b.prototype.isComplex=function(){return this.hasProperties()||
this.base.isComplex()};b.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()};b.prototype.isNumber=function(){return this.bareLiteral(R)};b.prototype.isString=function(){return this.bareLiteral(Za)};b.prototype.isRegex=function(){return this.bareLiteral(Z)};b.prototype.isUndefined=function(){return this.bareLiteral(la)};b.prototype.isNull=function(){return this.bareLiteral(ba)};b.prototype.isBoolean=function(){return this.bareLiteral(Da)};b.prototype.isAtomic=function(){var a,
b,f,d;d=this.properties.concat(this.base);a=0;for(b=d.length;a<b;a++)if(f=d[a],f.soak||f instanceof g)return!1;return!0};b.prototype.isNotCallable=function(){return this.isNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()||this.isUndefined()||this.isNull()||this.isBoolean()};b.prototype.isStatement=function(a){return!this.properties.length&&this.base.isStatement(a)};b.prototype.assigns=function(a){return!this.properties.length&&this.base.assigns(a)};
b.prototype.jumps=function(a){return!this.properties.length&&this.base.jumps(a)};b.prototype.isObject=function(a){return this.properties.length?!1:this.base instanceof C&&(!a||this.base.generated)};b.prototype.isSplice=function(){var a;a=this.properties;return a[a.length-1]instanceof ca};b.prototype.looksStatic=function(a){var b;return this.base.value===a&&1===this.properties.length&&"prototype"!==(null!=(b=this.properties[0].name)?b.value:void 0)};b.prototype.unwrap=function(){return this.properties.length?
this:this.base};b.prototype.cacheReference=function(a){var n,f,d,c;n=this.properties;d=n[n.length-1];if(2>this.properties.length&&!this.base.isComplex()&&(null==d||!d.isComplex()))return[this,this];n=new b(this.base,this.properties.slice(0,-1));n.isComplex()&&(f=new z(a.scope.freeVariable("base")),n=new b(new D(new V(f,n))));if(!d)return[n,f];d.isComplex()&&(c=new z(a.scope.freeVariable("name")),d=new k(new V(c,d.index)),c=new k(c));return[n.add(d),new b(f||n.base,[c||d])]};b.prototype.compileNode=
function(a){var b,f,d,n,c;this.base.front=this.front;c=this.properties;b=this.base.compileToFragments(a,c.length?q:null);c.length&&aa.test(Ca(b))&&b.push(this.makeCode("."));f=0;for(d=c.length;f<d;f++)n=c[f],b.push.apply(b,n.compileToFragments(a));return b};b.prototype.unfoldSoak=function(a){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var f,d,c,oa,e;if(d=n.base.unfoldSoak(a))return(f=d.body.properties).push.apply(f,n.properties),d;e=n.properties;
d=f=0;for(c=e.length;f<c;d=++f)if(oa=e[d],oa.soak)return oa.soak=!1,f=new b(n.base,n.properties.slice(0,d)),c=new b(n.base,n.properties.slice(d)),f.isComplex()&&(d=new z(a.scope.freeVariable("ref")),f=new D(new V(d,f)),c.base=d),new E(new F(f),c,{soak:!0});return!1}}(this)()};return b}(a);e.Comment=G=function(a){function b(a){this.comment=a}na(b,a);b.prototype.isStatement=fa;b.prototype.makeReturn=ea;b.prototype.compileNode=function(a,b){var f;f=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *");f="/*"+
Na(f,this.tab)+(0<=Ha.call(f,"\n")?"\n"+this.tab:"")+" */";(b||a.level)===u&&(f=a.indent+f);return[this.makeCode("\n"),this.makeCode(f)]};return b}(a);e.Call=g=function(a){function b(a,b,f){this.variable=a;this.args=null!=b?b:[];this.soak=f;this.isNew=!1;this.variable instanceof L&&this.variable.isNotCallable()&&this.variable.error("literal is not a function")}na(b,a);b.prototype.children=["variable","args"];b.prototype.updateLocationDataIfMissing=function(a){var n,f;this.locationData&&this.needsUpdatedStartLocation&&
(this.locationData.first_line=a.first_line,this.locationData.first_column=a.first_column,n=(null!=(f=this.variable)?f.base:void 0)||this.variable,n.needsUpdatedStartLocation&&(this.variable.locationData.first_line=a.first_line,this.variable.locationData.first_column=a.first_column,n.updateLocationDataIfMissing(a)),delete this.needsUpdatedStartLocation);return b.__super__.updateLocationDataIfMissing.apply(this,arguments)};b.prototype.newInstance=function(){var a,c;a=(null!=(c=this.variable)?c.base:
void 0)||this.variable;a instanceof b&&!a.isNew?a.newInstance():this.isNew=!0;this.needsUpdatedStartLocation=!0;return this};b.prototype.unfoldSoak=function(a){var n,f,d,c,e;if(this.soak){if(this instanceof ja)n=new B(this.superReference(a)),f=new L(n);else{if(f=Ka(a,this,"variable"))return f;f=(new L(this.variable)).cacheReference(a);n=f[0];f=f[1]}f=new b(f,this.args);f.isNew=this.isNew;n=new B("typeof "+n.compile(a)+' \x3d\x3d\x3d "function"');return new E(n,new L(f),{soak:!0})}n=this;for(d=[];;)if(n.variable instanceof
b)d.push(n),n=n.variable;else{if(!(n.variable instanceof L))break;d.push(n);if(!((n=n.variable.base)instanceof b))break}e=d.reverse();d=0;for(c=e.length;d<c;d++)n=e[d],f&&(n.variable instanceof b?n.variable=f:n.variable.base=f),f=Ka(a,n,"variable");return f};b.prototype.compileNode=function(a){var b,f,d,n,c,e;null!=(d=this.variable)&&(d.front=this.front);d=Q.compileSplattedArray(a,this.args,!0);if(d.length)return this.compileSplat(a,d);d=[];e=this.args;f=n=0;for(c=e.length;n<c;f=++n)b=e[f],f&&d.push(this.makeCode(", ")),
d.push.apply(d,b.compileToFragments(a,h));b=[];this instanceof ja?(a=this.superReference(a)+(".call("+this.superThis(a)),d.length&&(a+=", "),b.push(this.makeCode(a))):(this.isNew&&b.push(this.makeCode("new ")),b.push.apply(b,this.variable.compileToFragments(a,q)),b.push(this.makeCode("(")));b.push.apply(b,d);b.push(this.makeCode(")"));return b};b.prototype.compileSplat=function(a,b){var f,d,n,c;if(this instanceof ja)return[].concat(this.makeCode(this.superReference(a)+".apply("+this.superThis(a)+
", "),b,this.makeCode(")"));if(this.isNew)return f=this.tab+da,[].concat(this.makeCode("(function(func, args, ctor) {\n"+f+"ctor.prototype \x3d func.prototype;\n"+f+"var child \x3d new ctor, result \x3d func.apply(child, args);\n"+f+"return Object(result) \x3d\x3d\x3d result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(a,h),this.makeCode(", "),b,this.makeCode(", function(){})"));f=[];d=new L(this.variable);(n=d.properties.pop())&&d.isComplex()?(c=a.scope.freeVariable("ref"),
f=f.concat(this.makeCode("("+c+" \x3d "),d.compileToFragments(a,h),this.makeCode(")"),n.compileToFragments(a))):(d=d.compileToFragments(a,q),aa.test(Ca(d))&&(d=this.wrapInBraces(d)),n?(c=Ca(d),d.push.apply(d,n.compileToFragments(a))):c="null",f=f.concat(d));return f.concat(this.makeCode(".apply("+c+", "),b,this.makeCode(")"))};return b}(a);e.SuperCall=ja=function(a){function b(a){b.__super__.constructor.call(this,null,null!=a?a:[new Q(new z("arguments"))]);this.isBare=null!=a}na(b,a);b.prototype.superReference=
function(a){var b,f,d,c,n,e,g;c=a.scope.namedMethod();if(null!=c&&c.klass){d=c.klass;n=c.name;g=c.variable;d.isComplex()&&(f=new z(a.scope.parent.freeVariable("base")),b=new L(new D(new V(f,d))),g.base=b,g.properties.splice(0,d.properties.length));if(n.isComplex()||n instanceof k&&n.index.isAssignable())e=new z(a.scope.parent.freeVariable("name")),n=new k(new V(e,n.index)),g.properties.pop(),g.properties.push(n);b=[new va(new P("__super__"))];c["static"]&&b.push(new va(new P("constructor")));b.push(null!=
e?new k(e):n);return(new L(null!=f?f:d,b)).compile(a)}return null!=c&&c.ctor?c.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")};b.prototype.superThis=function(a){return(a=a.scope.method)&&!a.klass&&a.context||"this"};return b}(g);e.RegexWithInterpolations=function(a){function b(a){null==a&&(a=[]);b.__super__.constructor.call(this,new L(new z("RegExp")),a,!1)}na(b,a);return b}(g);e.TaggedTemplateCall=function(a){function b(a,oa,f){oa instanceof Za&&(oa=
new Ua(c.wrap([new L(oa)])));b.__super__.constructor.call(this,a,[oa],f)}na(b,a);b.prototype.compileNode=function(a){a.inTaggedTemplateCall=!0;return this.variable.compileToFragments(a,q).concat(this.args[0].compileToFragments(a,h))};return b}(g);e.Extends=M=function(a){function b(a,b){this.child=a;this.parent=b}na(b,a);b.prototype.children=["child","parent"];b.prototype.compileToFragments=function(a){return(new g(new L(new B(ya("extend",a))),[this.child,this.parent])).compileToFragments(a)};return b}(a);
e.Access=va=function(a){function b(a,b){this.name=a;this.soak="soak"===b}na(b,a);b.prototype.children=["name"];b.prototype.compileToFragments=function(a){var b,f;a=this.name.compileToFragments(a);b=this.name.unwrap();return b instanceof P?(f=b.value,0<=Ha.call(m,f))?[this.makeCode('["')].concat(Aa.call(a),[this.makeCode('"]')]):[this.makeCode(".")].concat(Aa.call(a)):[this.makeCode("[")].concat(Aa.call(a),[this.makeCode("]")])};b.prototype.isComplex=H;return b}(a);e.Index=k=function(a){function b(a){this.index=
a}na(b,a);b.prototype.children=["index"];b.prototype.compileToFragments=function(a){return[].concat(this.makeCode("["),this.index.compileToFragments(a,O),this.makeCode("]"))};b.prototype.isComplex=function(){return this.index.isComplex()};return b}(a);e.Range=Y=function(a){function b(a,b,f){this.from=a;this.to=b;this.equals=(this.exclusive="exclusive"===f)?"":"\x3d"}na(b,a);b.prototype.children=["from","to"];b.prototype.compileVariables=function(a){var b,f;a=Fa(a,{top:!0});b=X(a,"isComplex");f=this.cacheToCodeFragments(this.from.cache(a,
h,b));this.fromC=f[0];this.fromVar=f[1];f=this.cacheToCodeFragments(this.to.cache(a,h,b));this.toC=f[0];this.toVar=f[1];if(f=X(a,"step"))a=this.cacheToCodeFragments(f.cache(a,h,b)),this.step=a[0],this.stepVar=a[1];this.fromNum=this.from.isNumber()?Number(this.fromVar):null;this.toNum=this.to.isNumber()?Number(this.toVar):null;return this.stepNum=null!=f&&f.isNumber()?Number(this.stepVar):null};b.prototype.compileNode=function(a){var b,f,d,c,n,e,g,h,k,m;this.fromVar||this.compileVariables(a);if(!a.index)return this.compileArray(a);
e=null!=this.fromNum&&null!=this.toNum;n=X(a,"index");g=(a=X(a,"name"))&&a!==n;m=n+" \x3d "+this.fromC;this.toC!==this.toVar&&(m+=", "+this.toC);this.step!==this.stepVar&&(m+=", "+this.step);c=[n+" \x3c"+this.equals,n+" \x3e"+this.equals];f=c[0];c=c[1];f=null!=this.stepNum?0<this.stepNum?f+" "+this.toVar:c+" "+this.toVar:e?(h=[this.fromNum,this.toNum],d=h[0],k=h[1],h,d<=k?f+" "+k:c+" "+k):(b=this.stepVar?this.stepVar+" \x3e 0":this.fromVar+" \x3c\x3d "+this.toVar,b+" ? "+f+" "+this.toVar+" : "+c+
" "+this.toVar);b=this.stepVar?n+" +\x3d "+this.stepVar:e?g?d<=k?"++"+n:"--"+n:d<=k?n+"++":n+"--":g?b+" ? ++"+n+" : --"+n:b+" ? "+n+"++ : "+n+"--";g&&(m=a+" \x3d "+m);g&&(b=a+" \x3d "+b);return[this.makeCode(m+"; "+f+"; "+b)]};b.prototype.compileArray=function(a){var b,f,d,c,n,e,g,h,k;if((f=null!=this.fromNum&&null!=this.toNum)&&20>=Math.abs(this.fromNum-this.toNum))return b=function(){h=[];for(var a=e=this.fromNum,b=this.toNum;e<=b?a<=b:a>=b;e<=b?a++:a--)h.push(a);return h}.apply(this),this.exclusive&&
b.pop(),[this.makeCode("["+b.join(", ")+"]")];c=this.tab+da;d=a.scope.freeVariable("i",{single:!0});g=a.scope.freeVariable("results");n="\n"+c+g+" \x3d [];";f?(a.index=d,f=Ca(this.compileNode(a))):(k=d+" \x3d "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),f=this.fromVar+" \x3c\x3d "+this.toVar,f="var "+k+"; "+f+" ? "+d+" \x3c"+this.equals+" "+this.toVar+" : "+d+" \x3e"+this.equals+" "+this.toVar+"; "+f+" ? "+d+"++ : "+d+"--");d="{ "+g+".push("+d+"); }\n"+c+"return "+g+";\n"+a.indent;a=function(a){return null!=
a?a.contains(gb):void 0};if(a(this.from)||a(this.to))b=", arguments";return[this.makeCode("(function() {"+n+"\n"+c+"for ("+f+")"+d+"}).apply(this"+(null!=b?b:"")+")")]};return b}(a);e.Slice=ca=function(a){function b(a){this.range=a;b.__super__.constructor.call(this)}na(b,a);b.prototype.children=["range"];b.prototype.compileNode=function(a){var b,f,d,c,n;b=this.range;c=b.to;d=(b=b.from)&&b.compileToFragments(a,O)||[this.makeCode("0")];c&&(b=c.compileToFragments(a,O),f=Ca(b),this.range.exclusive||-1!==
+f)&&(n=", "+(this.range.exclusive?f:c.isNumber()?""+(+f+1):(b=c.compileToFragments(a,q),"+"+Ca(b)+" + 1 || 9e9")));return[this.makeCode(".slice("+Ca(d)+(n||"")+")")]};return b}(a);e.Obj=C=function(a){function b(a,b){this.generated=null!=b?b:!1;this.objects=this.properties=a||[]}na(b,a);b.prototype.children=["properties"];b.prototype.compileNode=function(a){var b,f,d,c,n,e,g,h,k,m,q,r,p;p=this.properties;if(this.generated)for(f=0,b=p.length;f<b;f++)d=p[f],d instanceof L&&d.error("cannot have an implicit value in an implicit object");
f=b=0;for(d=p.length;b<d&&!(r=p[f],(r.variable||r).base instanceof D);f=++b);d=f<p.length;n=a.indent+=da;k=this.lastNonComment(this.properties);b=[];d&&(q=a.scope.freeVariable("obj"),b.push(this.makeCode("(\n"+n+q+" \x3d ")));b.push(this.makeCode("{"+(0===p.length||0===f?"}":"\n")));c=h=0;for(m=p.length;h<m;c=++h)r=p[c],c===f&&(0!==c&&b.push(this.makeCode("\n"+n+"}")),b.push(this.makeCode(",\n"))),g=c===p.length-1||c===f-1?"":r===k||r instanceof G?"\n":",\n",e=r instanceof G?"":n,d&&c<f&&(e+=da),
r instanceof V&&("object"!==r.context&&r.operatorToken.error("unexpected "+r.operatorToken.value),r.variable instanceof L&&r.variable.hasProperties()&&r.variable.error("invalid object key")),r instanceof L&&r["this"]&&(r=new V(r.properties[0].name,r,"object")),r instanceof G||(c<f?r instanceof V||(r=new V(r,r,"object")):(r instanceof V?(c=r.variable,r=r.value):(r=r.base.cache(a),c=r[0],r=r[1],c instanceof z&&(c=new P(c.value))),r=new V(new L(new z(q),[new va(c)]),r))),e&&b.push(this.makeCode(e)),
b.push.apply(b,r.compileToFragments(a,u)),g&&b.push(this.makeCode(g));d?b.push(this.makeCode(",\n"+n+q+"\n"+this.tab+")")):0!==p.length&&b.push(this.makeCode("\n"+this.tab+"}"));return this.front&&!d?this.wrapInBraces(b):b};b.prototype.assigns=function(a){var b,f,d,c;c=this.properties;b=0;for(f=c.length;b<f;b++)if(d=c[b],d.assigns(a))return!0;return!1};return b}(a);e.Arr=pa=function(a){function b(a){this.objects=a||[]}na(b,a);b.prototype.children=["objects"];b.prototype.compileNode=function(a){var b,
f,d,c,n;if(!this.objects.length)return[this.makeCode("[]")];a.indent+=da;b=Q.compileSplattedArray(a,this.objects);if(b.length)return b;b=[];var e;n=this.objects;e=[];d=0;for(c=n.length;d<c;d++)f=n[d],e.push(f.compileToFragments(a,h));d=c=0;for(n=e.length;c<n;d=++c)f=e[d],d&&b.push(this.makeCode(", ")),b.push.apply(b,f);0<=Ca(b).indexOf("\n")?(b.unshift(this.makeCode("[\n"+a.indent)),b.push(this.makeCode("\n"+this.tab+"]"))):(b.unshift(this.makeCode("[")),b.push(this.makeCode("]")));return b};b.prototype.assigns=
function(a){var b,f,d,c;c=this.objects;b=0;for(f=c.length;b<f;b++)if(d=c[b],d.assigns(a))return!0;return!1};return b}(a);e.Class=v=function(a){function b(a,b,f){this.variable=a;this.parent=b;this.body=null!=f?f:new c;this.boundFuncs=[];this.body.classBody=!0}na(b,a);b.prototype.children=["variable","parent","body"];b.prototype.defaultClassVariableName="_Class";b.prototype.determineName=function(){var a,b;if(!this.variable)return this.defaultClassVariableName;b=this.variable.properties;b=(a=b[b.length-
1])?a instanceof va&&a.name:this.variable.base;if(!(b instanceof z||b instanceof P))return this.defaultClassVariableName;b=b.value;a||(a=Ga(b))&&this.variable.error(a);return 0<=Ha.call(m,b)?"_"+b:b};b.prototype.setContext=function(a){return this.body.traverseChildren(!1,function(b){if(b.classBody)return!1;if(b instanceof ha)return b.value=a;if(b instanceof p&&b.bound)return b.context=a})};b.prototype.addBoundFunctions=function(a){var b,f,d,c;c=this.boundFuncs;f=0;for(d=c.length;f<d;f++)b=c[f],b=
(new L(new ha,[new va(b)])).compile(a),this.ctor.body.unshift(new B(b+" \x3d "+ya("bind",a)+"("+b+", this)"))};b.prototype.addProperties=function(a,b,f){var d,c,n,e;e=a.base.properties.slice(0);var g;for(g=[];d=e.shift();)d instanceof V&&(c=d.variable.base,delete d.context,n=d.value,"constructor"===c.value?(this.ctor&&d.error("cannot define more than one constructor in a class"),n.bound&&d.error("cannot define a constructor as a bound function"),n instanceof p?d=this.ctor=n:(this.externalCtor=f.classScope.freeVariable("ctor"),
d=new V(new z(this.externalCtor),n))):d.variable["this"]?n["static"]=!0:(a=c.isComplex()?new k(c):new va(c),d.variable=new L(new z(b),[new va(new P("prototype")),a]),n instanceof p&&n.bound&&(this.boundFuncs.push(c),n.bound=!1))),g.push(d);return ra(g)};b.prototype.walkBody=function(a,e){return this.traverseChildren(!1,function(f){return function(d){var n,g,oa,h,k,m,q;n=!0;if(d instanceof b)return!1;if(d instanceof c){q=g=d.expressions;oa=h=0;for(k=q.length;h<k;oa=++h)m=q[oa],m instanceof V&&m.variable.looksStatic(a)?
m.value["static"]=!0:m instanceof L&&m.isObject(!0)&&(n=!1,g[oa]=f.addProperties(m,a,e));d.expressions=ma(g)}return n&&!(d instanceof b)}}(this))};b.prototype.hoistDirectivePrologue=function(){var a,b,f;b=0;for(a=this.body.expressions;(f=a[b])&&f instanceof G||f instanceof L&&f.isString();)++b;return this.directives=a.splice(0,b)};b.prototype.ensureConstructor=function(a){this.ctor||(this.ctor=new p,this.externalCtor?this.ctor.body.push(new B(this.externalCtor+".apply(this, arguments)")):this.parent&&
this.ctor.body.push(new B(a+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor));this.ctor.ctor=this.ctor.name=a;this.ctor.klass=null;return this.ctor.noReturn=!0};b.prototype.compileNode=function(a){var b,f,d,n,e;(f=this.body.jumps())&&f.error("Class bodies cannot contain pure statements");(b=this.body.contains(gb))&&b.error("Class bodies shouldn't reference arguments");e=this.determineName();n=new z(e);f=new p([],c.wrap([this.body]));
b=[];a.classScope=f.makeScope(a.scope);this.hoistDirectivePrologue();this.setContext(e);this.walkBody(e,a);this.ensureConstructor(e);this.addBoundFunctions(a);this.body.spaced=!0;this.body.expressions.push(n);this.parent&&(e=new z(a.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new M(n,e)),f.params.push(new W(e)),b.push(this.parent));(d=this.body.expressions).unshift.apply(d,this.directives);d=new D(new g(f,b));this.variable&&(d=new V(this.variable,d,null,{moduleDeclaration:this.moduleDeclaration}));
return d.compileToFragments(a)};return b}(a);e.ModuleDeclaration=w=function(a){function b(a,b){this.clause=a;this.source=b;this.checkSource()}na(b,a);b.prototype.children=["clause","source"];b.prototype.isStatement=fa;b.prototype.jumps=ea;b.prototype.makeReturn=ea;b.prototype.checkSource=function(){if(null!=this.source&&this.source instanceof Ua)return this.source.error("the name of the module to be imported from must be an uninterpolated string")};b.prototype.checkScope=function(a,b){if(0!==a.indent.length)return this.error(b+
" statements must be at top-level scope")};return b}(a);e.ImportDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){var b,f;this.checkScope(a,"import");a.importedSymbols=[];b=[];b.push(this.makeCode(this.tab+"import "));null!=this.clause&&b.push.apply(b,this.clause.compileNode(a));null!=(null!=(f=this.source)?f.value:void 0)&&(null!==this.clause&&b.push(this.makeCode(" from ")),b.push(this.makeCode(this.source.value)));
b.push(this.makeCode(";"));return b};return b}(w);e.ImportClause=function(a){function b(a,b){this.defaultBinding=a;this.namedImports=b}na(b,a);b.prototype.children=["defaultBinding","namedImports"];b.prototype.compileNode=function(a){var b;b=[];null!=this.defaultBinding&&(b.push.apply(b,this.defaultBinding.compileNode(a)),null!=this.namedImports&&b.push(this.makeCode(", ")));null!=this.namedImports&&b.push.apply(b,this.namedImports.compileNode(a));return b};return b}(a);e.ExportDeclaration=w=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);b.prototype.compileNode=function(a){var b,f;this.checkScope(a,"export");b=[];b.push(this.makeCode(this.tab+"export "));this instanceof K&&b.push(this.makeCode("default "));this instanceof K||!(this.clause instanceof V||this.clause instanceof v)||(this.clause instanceof v&&!this.clause.variable&&this.clause.error("anonymous classes cannot be exported"),b.push(this.makeCode("var ")),this.clause.moduleDeclaration="export");b=null!=this.clause.body&&this.clause.body instanceof c?b.concat(this.clause.compileToFragments(a,
u)):b.concat(this.clause.compileNode(a));null!=(null!=(f=this.source)?f.value:void 0)&&b.push(this.makeCode(" from "+this.source.value));b.push(this.makeCode(";"));return b};return b}(w);e.ExportNamedDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportDefaultDeclaration=K=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportAllDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(w);e.ModuleSpecifierList=w=function(a){function b(a){this.specifiers=a}na(b,a);b.prototype.children=["specifiers"];b.prototype.compileNode=function(a){var b,f,d,c,e;b=[];a.indent+=da;var n;e=this.specifiers;n=[];d=0;for(c=e.length;d<c;d++)f=e[d],n.push(f.compileToFragments(a,h));if(0!==this.specifiers.length){b.push(this.makeCode("{\n"+a.indent));d=c=0;for(e=n.length;c<e;d=++c)f=n[d],d&&b.push(this.makeCode(",\n"+a.indent)),b.push.apply(b,f);b.push(this.makeCode("\n}"))}else b.push(this.makeCode("{}"));
return b};return b}(a);e.ImportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ModuleSpecifier=T=function(a){function b(a,b,f){this.original=a;this.alias=b;this.moduleDeclarationType=f;this.identifier=null!=this.alias?this.alias.value:this.original.value}na(b,a);b.prototype.children=["original","alias"];b.prototype.compileNode=
function(a){a.scope.find(this.identifier,this.moduleDeclarationType);a=[];a.push(this.makeCode(this.original.value));null!=this.alias&&a.push(this.makeCode(" as "+this.alias.value));return a};return b}(a);e.ImportSpecifier=w=function(a){function b(a,c){b.__super__.constructor.call(this,a,c,"import")}na(b,a);b.prototype.compileNode=function(a){var c;(c=this.identifier,0<=Ha.call(a.importedSymbols,c))||a.scope.check(this.identifier)?this.error("'"+this.identifier+"' has already been declared"):a.importedSymbols.push(this.identifier);
return b.__super__.compileNode.call(this,a)};return b}(T);e.ImportDefaultSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ImportNamespaceSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportSpecifier=function(a){function b(a,c){b.__super__.constructor.call(this,a,c,"export")}na(b,a);return b}(T);e.Assign=V=function(a){function b(a,b,f,d){this.variable=a;this.value=b;this.context=
f;null==d&&(d={});this.param=d.param;this.subpattern=d.subpattern;this.operatorToken=d.operatorToken;this.moduleDeclaration=d.moduleDeclaration}na(b,a);b.prototype.children=["variable","value"];b.prototype.isStatement=function(a){return(null!=a?a.level:void 0)===u&&null!=this.context&&(this.moduleDeclaration||0<=Ha.call(this.context,"?"))};b.prototype.checkAssignability=function(a,b){if(Object.prototype.hasOwnProperty.call(a.scope.positions,b.value)&&"import"===a.scope.variables[a.scope.positions[b.value]].type)return b.error("'"+
b.value+"' is read-only")};b.prototype.assigns=function(a){return this["object"===this.context?"value":"variable"].assigns(a)};b.prototype.unfoldSoak=function(a){return Ka(a,this,"variable")};b.prototype.compileNode=function(a){var b,f,d,c,e,g,n;if(f=this.variable instanceof L){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(a);if(this.variable.isSplice())return this.compileSplice(a);if("||\x3d"===(c=this.context)||"\x26\x26\x3d"===c||"?\x3d"===c)return this.compileConditional(a);
if("**\x3d"===(e=this.context)||"//\x3d"===e||"%%\x3d"===e)return this.compileSpecialMath(a)}this.value instanceof p&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):2<=(null!=(g=this.variable.properties)?g.length:void 0)&&(g=this.variable.properties,c=3<=g.length?Aa.call(g,0,d=g.length-2):(d=0,[]),e=g[d++],d=g[d++],"prototype"===(null!=(n=e.name)?n.value:void 0)&&(this.value.klass=new L(this.variable.base,c),
this.value.name=d,this.value.variable=this.variable)));this.context||(n=this.variable.unwrapAll(),n.isAssignable()||this.variable.error("'"+this.variable.compile(a)+"' can't be assigned"),"function"===typeof n.hasProperties&&n.hasProperties()||(this.moduleDeclaration?(this.checkAssignability(a,n),a.scope.add(n.value,this.moduleDeclaration)):this.param?a.scope.add(n.value,"var"):(this.checkAssignability(a,n),a.scope.find(n.value))));n=this.value.compileToFragments(a,h);f&&this.variable.base instanceof
C&&(this.variable.front=!0);f=this.variable.compileToFragments(a,h);if("object"===this.context){if(b=Ca(f),0<=Ha.call(m,b))f.unshift(this.makeCode('"')),f.push(this.makeCode('"'));return f.concat(this.makeCode(": "),n)}b=f.concat(this.makeCode(" "+(this.context||"\x3d")+" "),n);return a.level<=h?b:this.wrapInBraces(b)};b.prototype.compilePatternMatch=function(a){var c,f,d,e,g,n,m,q,r,p,l,t,w,D,C,v;D=a.level===u;q=this.value;t=this.variable.base.objects;if(!(w=t.length))return f=q.compileToFragments(a),
a.level>=y?this.wrapInBraces(f):f;l=t[0];1===w&&l instanceof x&&l.error("Destructuring assignment has no target");n=this.variable.isObject();if(D&&1===w&&!(l instanceof Q))return d=null,l instanceof b&&"object"===l.context?(f=l,e=f.variable,g=e.base,l=f.value,l instanceof b&&(d=l.value,l=l.variable)):(l instanceof b&&(d=l.value,l=l.variable),g=n?l["this"]?l.properties[0].name:new P(l.unwrap().value):new R(0)),c=g.unwrap()instanceof P,q=new L(q),q.properties.push(new (c?va:k)(g)),(p=Ga(l.unwrap().value))&&
l.error(p),d&&(q=new A("?",q,d)),(new b(l,q,null,{param:this.param})).compileToFragments(a,u);C=q.compileToFragments(a,h);v=Ca(C);f=[];e=!1;q.unwrap()instanceof z&&!this.variable.assigns(v)||(f.push([this.makeCode((d=a.scope.freeVariable("ref"))+" \x3d ")].concat(Aa.call(C))),C=[this.makeCode(d)],v=d);d=q=0;for(r=t.length;q<r;d=++q){l=t[d];g=d;if(!e&&l instanceof Q)p=l.name.unwrap().value,l=l.unwrap(),g=w+" \x3c\x3d "+v+".length ? "+ya("slice",a)+".call("+v+", "+d,(c=w-d-1)?(m=a.scope.freeVariable("i",
{single:!0}),g+=", "+m+" \x3d "+v+".length - "+c+") : ("+m+" \x3d "+d+", [])"):g+=") : []",g=new B(g),e=m+"++";else if(!e&&l instanceof x){if(c=w-d-1)1===c?e=v+".length - 1":(m=a.scope.freeVariable("i",{single:!0}),g=new B(m+" \x3d "+v+".length - "+c),e=m+"++",f.push(g.compileToFragments(a,h)));continue}else(l instanceof Q||l instanceof x)&&l.error("multiple splats/expansions are disallowed in an assignment"),d=null,l instanceof b&&"object"===l.context?(g=l.variable,g=g.base,l=l.value,l instanceof
b&&(d=l.value,l=l.variable)):(l instanceof b&&(d=l.value,l=l.variable),g=n?l["this"]?l.properties[0].name:new P(l.unwrap().value):new B(e||g)),p=l.unwrap().value,c=g.unwrap()instanceof P,g=new L(new B(v),[new (c?va:k)(g)]),d&&(g=new A("?",g,d));null!=p&&(p=Ga(p))&&l.error(p);f.push((new b(l,g,null,{param:this.param,subpattern:!0})).compileToFragments(a,h))}D||this.subpattern||f.push(C);f=this.joinFragmentArrays(f,", ");return a.level<h?f:this.wrapInBraces(f)};b.prototype.compileConditional=function(a){var c,
f;f=this.variable.cacheReference(a);c=f[0];f=f[1];c.properties.length||!(c.base instanceof B)||c.base instanceof ha||a.scope.check(c.base.value)||this.variable.error('the variable "'+c.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before");if(0<=Ha.call(this.context,"?"))return a.isExistentialEquals=!0,(new E(new F(c),f,{type:"if"})).addElse(new b(f,this.value,"\x3d")).compileToFragments(a);c=(new A(this.context.slice(0,-1),c,new b(f,this.value,"\x3d"))).compileToFragments(a);
return a.level<=h?c:this.wrapInBraces(c)};b.prototype.compileSpecialMath=function(a){var c,f;f=this.variable.cacheReference(a);c=f[0];f=f[1];return(new b(c,new A(this.context.slice(0,-1),f,this.value))).compileToFragments(a)};b.prototype.compileSplice=function(a){var b,f,d,c,e,g;c=this.variable.properties.pop().range;d=c.from;b=c.to;f=c.exclusive;g=this.variable.compile(a);d?(e=this.cacheToCodeFragments(d.cache(a,y)),c=e[0],e=e[1]):c=e="0";b?null!=d&&d.isNumber()&&b.isNumber()?(b=b.compile(a)-e,f||
(b+=1)):(b=b.compile(a,q)+" - "+e,f||(b+=" + 1")):b="9e9";f=this.value.cache(a,h);d=f[0];f=f[1];b=[].concat(this.makeCode("[].splice.apply("+g+", ["+c+", "+b+"].concat("),d,this.makeCode(")), "),f);return a.level>u?this.wrapInBraces(b):b};return b}(a);e.Code=p=function(a){function b(a,b,f){this.params=a||[];this.body=b||new c;this.bound="boundfunc"===f;this.isGenerator=!!this.body.contains(function(a){return a instanceof A&&a.isYield()||a instanceof qa})}na(b,a);b.prototype.children=["params","body"];
b.prototype.isStatement=function(){return!!this.ctor};b.prototype.jumps=H;b.prototype.makeScope=function(a){return new J(a,this.body,this)};b.prototype.compileNode=function(a){var e,f,d,n,h,k,m,r,l,p,y,u,t;this.bound&&null!=(f=a.scope.method)&&f.bound&&(this.context=a.scope.method.context);if(this.bound&&!this.context)return this.context="_this",f=new b([new W(new z(this.context))],new c([this])),f=new g(f,[new ha]),f.updateLocationDataIfMissing(this.locationData),f.compileNode(a);a.scope=X(a,"classScope")||
this.makeScope(a.scope);a.scope.shared=X(a,"sharedScope");a.indent+=da;delete a.bare;delete a.isExistentialEquals;f=[];e=[];r=this.params;n=0;for(k=r.length;n<k;n++)m=r[n],m instanceof x||a.scope.parameter(m.asReference(a));r=this.params;n=0;for(k=r.length;n<k;n++)if(m=r[n],m.splat||m instanceof x){n=this.params;h=0;for(m=n.length;h<m;h++)l=n[h],l instanceof x||!l.name.value||a.scope.add(l.name.value,"var",!0);h=new V(new L(new pa(function(){var b,d,f,c;f=this.params;c=[];d=0;for(b=f.length;d<b;d++)l=
f[d],c.push(l.asReference(a));return c}.call(this))),new L(new z("arguments")));break}y=this.params;r=0;for(n=y.length;r<n;r++)m=y[r],m.isComplex()?(t=p=m.asReference(a),m.value&&(t=new A("?",p,m.value)),e.push(new V(new L(m.name),t,"\x3d",{param:!0}))):(p=m,m.value&&(k=new B(p.name.value+" \x3d\x3d null"),t=new V(new L(m.name),m.value,"\x3d"),e.push(new E(k,t)))),h||f.push(p);m=this.body.isEmpty();h&&e.unshift(h);e.length&&(d=this.body.expressions).unshift.apply(d,e);d=h=0;for(e=f.length;h<e;d=++h)l=
f[d],f[d]=l.compileToFragments(a),a.scope.parameter(Ca(f[d]));u=[];this.eachParamName(function(a,b){0<=Ha.call(u,a)&&b.error("multiple parameters named "+a);return u.push(a)});m||this.noReturn||this.body.makeReturn();d="function";this.isGenerator&&(d+="*");this.ctor&&(d+=" "+this.name);e=[this.makeCode(d+"(")];d=m=0;for(h=f.length;m<h;d=++m)l=f[d],d&&e.push(this.makeCode(", ")),e.push.apply(e,l);e.push(this.makeCode(") {"));this.body.isEmpty()||(e=e.concat(this.makeCode("\n"),this.body.compileWithDeclarations(a),
this.makeCode("\n"+this.tab)));e.push(this.makeCode("}"));return this.ctor?[this.makeCode(this.tab)].concat(Aa.call(e)):this.front||a.level>=q?this.wrapInBraces(e):e};b.prototype.eachParamName=function(a){var b,f,d,c,e;c=this.params;e=[];b=0;for(f=c.length;b<f;b++)d=c[b],e.push(d.eachName(a));return e};b.prototype.traverseChildren=function(a,c){if(a)return b.__super__.traverseChildren.call(this,a,c)};return b}(a);e.Param=W=function(a){function b(a,b,f){this.name=a;this.value=b;this.splat=f;(a=Ga(this.name.unwrapAll().value))&&
this.name.error(a);this.name instanceof C&&this.name.generated&&(a=this.name.objects[0].operatorToken,a.error("unexpected "+a.value))}na(b,a);b.prototype.children=["name","value"];b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a,h)};b.prototype.asReference=function(a){var b;if(this.reference)return this.reference;b=this.name;b["this"]?(b=b.properties[0].name.value,0<=Ha.call(m,b)&&(b="_"+b),b=new z(a.scope.freeVariable(b))):b.isComplex()&&(b=new z(a.scope.freeVariable("arg")));
b=new L(b);this.splat&&(b=new Q(b));b.updateLocationDataIfMissing(this.locationData);return this.reference=b};b.prototype.isComplex=function(){return this.name.isComplex()};b.prototype.eachName=function(a,b){var f,d,c,e;null==b&&(b=this.name);f=function(b){return a("@"+b.properties[0].name.value,b)};if(b instanceof B)return a(b.value,b);if(b instanceof L)return f(b);b=null!=(d=b.objects)?d:[];d=0;for(c=b.length;d<c;d++)e=b[d],e instanceof V&&null==e.context&&(e=e.variable),e instanceof V?(e.value instanceof
V&&(e=e.value),this.eachName(a,e.value.unwrap())):e instanceof Q?(e=e.name.unwrap(),a(e.value,e)):e instanceof L?e.isArray()||e.isObject()?this.eachName(a,e.base):e["this"]?f(e):a(e.base.value,e.base):e instanceof x||e.error("illegal parameter "+e.compile())};return b}(a);e.Splat=Q=function(a){function b(a){this.name=a.compile?a:new B(a)}na(b,a);b.prototype.children=["name"];b.prototype.isAssignable=fa;b.prototype.assigns=function(a){return this.name.assigns(a)};b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a)};
b.prototype.unwrap=function(){return this.name};b.compileSplattedArray=function(a,c,f){var d,e,g,n,m,k;for(n=-1;(d=c[++n])&&!(d instanceof b););if(n>=c.length)return[];if(1===c.length)return d=c[0],c=d.compileToFragments(a,h),f?c:[].concat(d.makeCode(ya("slice",a)+".call("),c,d.makeCode(")"));f=c.slice(n);g=m=0;for(k=f.length;m<k;g=++m)d=f[g],e=d.compileToFragments(a,h),f[g]=d instanceof b?[].concat(d.makeCode(ya("slice",a)+".call("),e,d.makeCode(")")):[].concat(d.makeCode("["),e,d.makeCode("]"));
if(0===n)return d=c[0],a=d.joinFragmentArrays(f.slice(1),", "),f[0].concat(d.makeCode(".concat("),a,d.makeCode(")"));m=c.slice(0,n);k=[];e=0;for(g=m.length;e<g;e++)d=m[e],k.push(d.compileToFragments(a,h));d=c[0].joinFragmentArrays(k,", ");a=c[n].joinFragmentArrays(f,", ");f=c[c.length-1];return[].concat(c[0].makeCode("["),d,c[n].makeCode("].concat("),a,f.makeCode(")"))};return b}(a);e.Expansion=x=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isComplex=
H;b.prototype.compileNode=function(a){return this.error("Expansion must be used inside a destructuring assignment or parameter list")};b.prototype.asReference=function(a){return this};b.prototype.eachName=function(a){};return b}(a);e.While=w=function(a){function b(a,b){this.condition=null!=b&&b.invert?a.invert():a;this.guard=null!=b?b.guard:void 0}na(b,a);b.prototype.children=["condition","guard","body"];b.prototype.isStatement=fa;b.prototype.makeReturn=function(a){if(a)return b.__super__.makeReturn.apply(this,
arguments);this.returns=!this.jumps({loop:!0});return this};b.prototype.addBody=function(a){this.body=a;return this};b.prototype.jumps=function(){var a,b,f,d;a=this.body.expressions;if(!a.length)return!1;b=0;for(d=a.length;b<d;b++)if(f=a[b],f=f.jumps({loop:!0}))return f;return!1};b.prototype.compileNode=function(a){var b,f,d;a.indent+=da;d="";b=this.body;b.isEmpty()?b=this.makeCode(""):(this.returns&&(b.makeReturn(f=a.scope.freeVariable("results")),d=""+this.tab+f+" \x3d [];\n"),this.guard&&(1<b.expressions.length?
b.expressions.unshift(new E((new D(this.guard)).invert(),new ua("continue"))):this.guard&&(b=c.wrap([new E(this.guard,b)]))),b=[].concat(this.makeCode("\n"),b.compileToFragments(a,u),this.makeCode("\n"+this.tab)));a=[].concat(this.makeCode(d+this.tab+"while ("),this.condition.compileToFragments(a,O),this.makeCode(") {"),b,this.makeCode("}"));this.returns&&a.push(this.makeCode("\n"+this.tab+"return "+f+";"));return a};return b}(a);e.Op=A=function(a){function b(a,b,e,n){if("in"===a)return new N(b,e);
if("do"===a)return this.generateDo(b);if("new"===a){if(b instanceof g&&!b["do"]&&!b.isNew)return b.newInstance();if(b instanceof p&&b.bound||b["do"])b=new D(b)}this.operator=c[a]||a;this.first=b;this.second=e;this.flip=!!n;return this}var c,e;na(b,a);c={"\x3d\x3d":"\x3d\x3d\x3d","!\x3d":"!\x3d\x3d",of:"in",yieldfrom:"yield*"};e={"!\x3d\x3d":"\x3d\x3d\x3d","\x3d\x3d\x3d":"!\x3d\x3d"};b.prototype.children=["first","second"];b.prototype.isNumber=function(){var a;return this.isUnary()&&("+"===(a=this.operator)||
"-"===a)&&this.first instanceof L&&this.first.isNumber()};b.prototype.isYield=function(){var a;return"yield"===(a=this.operator)||"yield*"===a};b.prototype.isUnary=function(){return!this.second};b.prototype.isComplex=function(){return!this.isNumber()};b.prototype.isChainable=function(){var a;return"\x3c"===(a=this.operator)||"\x3e"===a||"\x3e\x3d"===a||"\x3c\x3d"===a||"\x3d\x3d\x3d"===a||"!\x3d\x3d"===a};b.prototype.invert=function(){var a,d,c;if(this.isChainable()&&this.first.isChainable()){a=!0;
for(d=this;d&&d.operator;)a&&(a=d.operator in e),d=d.first;if(!a)return(new D(this)).invert();for(d=this;d&&d.operator;)d.invert=!d.invert,d.operator=e[d.operator],d=d.first;return this}return(d=e[this.operator])?(this.operator=d,this.first.unwrap()instanceof b&&this.first.invert(),this):this.second?(new D(this)).invert():"!"===this.operator&&(a=this.first.unwrap())instanceof b&&("!"===(c=a.operator)||"in"===c||"instanceof"===c)?a:new b("!",this)};b.prototype.unfoldSoak=function(a){var b;return("++"===
(b=this.operator)||"--"===b||"delete"===b)&&Ka(a,this,"first")};b.prototype.generateDo=function(a){var b,f,c,e,n;e=[];n=(a instanceof V&&(b=a.value.unwrap())instanceof p?b:a).params||[];b=0;for(f=n.length;b<f;b++)c=n[b],c.value?(e.push(c.value),delete c.value):e.push(c);a=new g(a,e);a["do"]=!0;return a};b.prototype.compileNode=function(a){var b,f;b=this.isChainable()&&this.first.isChainable();b||(this.first.front=this.front);"delete"===this.operator&&a.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var");
("--"===(f=this.operator)||"++"===f)&&(f=Ga(this.first.unwrapAll().value))&&this.first.error(f);if(this.isYield())return this.compileYield(a);if(this.isUnary())return this.compileUnary(a);if(b)return this.compileChain(a);switch(this.operator){case "?":return this.compileExistence(a);case "**":return this.compilePower(a);case "//":return this.compileFloorDivision(a);case "%%":return this.compileModulo(a);default:return b=this.first.compileToFragments(a,y),f=this.second.compileToFragments(a,y),b=[].concat(b,
this.makeCode(" "+this.operator+" "),f),a.level<=y?b:this.wrapInBraces(b)}};b.prototype.compileChain=function(a){var b;b=this.first.second.cache(a);this.first.second=b[0];b=b[1];a=this.first.compileToFragments(a,y).concat(this.makeCode(" "+(this.invert?"\x26\x26":"||")+" "),b.compileToFragments(a),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(a,y));return this.wrapInBraces(a)};b.prototype.compileExistence=function(a){var b,f;this.first.isComplex()?(f=new z(a.scope.freeVariable("ref")),
b=new D(new V(f,this.first))):f=b=this.first;return(new E(new F(b),f,{type:"if"})).addElse(this.second).compileToFragments(a)};b.prototype.compileUnary=function(a){var d,f,c;f=[];d=this.operator;f.push([this.makeCode(d)]);if("!"===d&&this.first instanceof F)return this.first.negated=!this.first.negated,this.first.compileToFragments(a);if(a.level>=q)return(new D(this)).compileToFragments(a);c="+"===d||"-"===d;("new"===d||"typeof"===d||"delete"===d||c&&this.first instanceof b&&this.first.operator===
d)&&f.push([this.makeCode(" ")]);if(c&&this.first instanceof b||"new"===d&&this.first.isStatement(a))this.first=new D(this.first);f.push(this.first.compileToFragments(a,y));this.flip&&f.reverse();return this.joinFragmentArrays(f,"")};b.prototype.compileYield=function(a){var b,f,c;f=[];b=this.operator;null==a.scope.parent&&this.error("yield can only occur inside functions");0<=Ha.call(Object.keys(this.first),"expression")&&!(this.first instanceof ia)?null!=this.first.expression&&f.push(this.first.expression.compileToFragments(a,
y)):(a.level>=O&&f.push([this.makeCode("(")]),f.push([this.makeCode(b)]),""!==(null!=(c=this.first.base)?c.value:void 0)&&f.push([this.makeCode(" ")]),f.push(this.first.compileToFragments(a,y)),a.level>=O&&f.push([this.makeCode(")")]));return this.joinFragmentArrays(f,"")};b.prototype.compilePower=function(a){var b;b=new L(new z("Math"),[new va(new P("pow"))]);return(new g(b,[this.first,this.second])).compileToFragments(a)};b.prototype.compileFloorDivision=function(a){var d,f;f=new L(new z("Math"),
[new va(new P("floor"))]);d=this.second.isComplex()?new D(this.second):this.second;d=new b("/",this.first,d);return(new g(f,[d])).compileToFragments(a)};b.prototype.compileModulo=function(a){var b;b=new L(new B(ya("modulo",a)));return(new g(b,[this.first,this.second])).compileToFragments(a)};b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+" "+this.operator)};return b}(a);e.In=N=function(a){function b(a,b){this.object=a;this.array=b}na(b,a);b.prototype.children=
["object","array"];b.prototype.invert=S;b.prototype.compileNode=function(a){var b,f,d,c,e;if(this.array instanceof L&&this.array.isArray()&&this.array.base.objects.length){e=this.array.base.objects;f=0;for(d=e.length;f<d;f++)if(c=e[f],c instanceof Q){b=!0;break}if(!b)return this.compileOrTest(a)}return this.compileLoopTest(a)};b.prototype.compileOrTest=function(a){var b,f,d,c,e,g,n,h,m,k;b=this.object.cache(a,y);m=b[0];n=b[1];f=this.negated?[" !\x3d\x3d "," \x26\x26 "]:[" \x3d\x3d\x3d "," || "];b=
f[0];f=f[1];k=[];h=this.array.base.objects;d=e=0;for(g=h.length;e<g;d=++e)c=h[d],d&&k.push(this.makeCode(f)),k=k.concat(d?n:m,this.makeCode(b),c.compileToFragments(a,q));return a.level<y?k:this.wrapInBraces(k)};b.prototype.compileLoopTest=function(a){var b,f,d;b=this.object.cache(a,h);d=b[0];f=b[1];b=[].concat(this.makeCode(ya("indexOf",a)+".call("),this.array.compileToFragments(a,h),this.makeCode(", "),f,this.makeCode(") "+(this.negated?"\x3c 0":"\x3e\x3d 0")));if(Ca(d)===Ca(f))return b;b=d.concat(this.makeCode(", "),
b);return a.level<h?b:this.wrapInBraces(b)};b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+(this.negated?"!":""))};return b}(a);e.Try=function(a){function b(a,b,f,d){this.attempt=a;this.errorVariable=b;this.recovery=f;this.ensure=d}na(b,a);b.prototype.children=["attempt","recovery","ensure"];b.prototype.isStatement=fa;b.prototype.jumps=function(a){var b;return this.attempt.jumps(a)||(null!=(b=this.recovery)?b.jumps(a):void 0)};b.prototype.makeReturn=
function(a){this.attempt&&(this.attempt=this.attempt.makeReturn(a));this.recovery&&(this.recovery=this.recovery.makeReturn(a));return this};b.prototype.compileNode=function(a){var b,f,d,c,e;a.indent+=da;e=this.attempt.compileToFragments(a,u);b=this.recovery?(f=a.scope.freeVariable("error",{reserve:!1}),c=new z(f),this.errorVariable?(d=Ga(this.errorVariable.unwrapAll().value),d?this.errorVariable.error(d):void 0,this.recovery.unshift(new V(this.errorVariable,c))):void 0,[].concat(this.makeCode(" catch ("),
c.compileToFragments(a),this.makeCode(") {\n"),this.recovery.compileToFragments(a,u),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:(f=a.scope.freeVariable("error",{reserve:!1}),[this.makeCode(" catch ("+f+") {}")]);a=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(a,u),this.makeCode("\n"+this.tab+"}")):[];return[].concat(this.makeCode(this.tab+"try {\n"),e,this.makeCode("\n"+this.tab+"}"),b,a)};return b}(a);e.Throw=ia=function(a){function b(a){this.expression=
a}na(b,a);b.prototype.children=["expression"];b.prototype.isStatement=fa;b.prototype.jumps=H;b.prototype.makeReturn=ea;b.prototype.compileNode=function(a){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(a),this.makeCode(";"))};return b}(a);e.Existence=F=function(a){function b(a){this.expression=a}na(b,a);b.prototype.children=["expression"];b.prototype.invert=S;b.prototype.compileNode=function(a){var b,f,d;this.expression.front=this.front;d=this.expression.compile(a,
y);this.expression.unwrap()instanceof z&&!a.scope.check(d)?(f=this.negated?["\x3d\x3d\x3d","||"]:["!\x3d\x3d","\x26\x26"],b=f[0],f=f[1],d="typeof "+d+" "+b+' "undefined" '+f+" "+d+" "+b+" null"):d=d+" "+(this.negated?"\x3d\x3d":"!\x3d")+" null";return[this.makeCode(a.level<=r?d:"("+d+")")]};return b}(a);e.Parens=D=function(a){function b(a){this.body=a}na(b,a);b.prototype.children=["body"];b.prototype.unwrap=function(){return this.body};b.prototype.isComplex=function(){return this.body.isComplex()};
b.prototype.compileNode=function(a){var b,f;b=this.body.unwrap();if(b instanceof L&&b.isAtomic())return b.front=this.front,b.compileToFragments(a);f=b.compileToFragments(a,O);return a.level<y&&(b instanceof A||b instanceof g||b instanceof I&&b.returns)?f:this.wrapInBraces(f)};return b}(a);e.StringWithInterpolations=Ua=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){var c,f,d,e,g;if(!a.inTaggedTemplateCall)return b.__super__.compileNode.apply(this,
arguments);d=this.body.unwrap();f=[];d.traverseChildren(!1,function(a){if(a instanceof Za)f.push(a);else if(a instanceof D)return f.push(a),!1;return!0});d=[];d.push(this.makeCode("`"));e=0;for(g=f.length;e<g;e++)c=f[e],c instanceof Za?(c=c.value.slice(1,-1),c=c.replace(/(\\*)(`|\$\{)/g,function(a,b,d){return 0===b.length%2?b+"\\"+d:a}),d.push(this.makeCode(c))):(d.push(this.makeCode("${")),d.push.apply(d,c.compileToFragments(a,O)),d.push(this.makeCode("}")));d.push(this.makeCode("`"));return d};
return b}(D);e.For=I=function(a){function b(a,b){this.source=b.source;this.guard=b.guard;this.step=b.step;this.name=b.name;this.index=b.index;this.body=c.wrap([a]);this.own=!!b.own;this.object=!!b.object;(this.from=!!b.from)&&this.index&&this.index.error("cannot use index with for-from");this.own&&!this.object&&b.ownTag.error("cannot use own with for-"+(this.from?"from":"in"));this.object&&(a=[this.index,this.name],this.name=a[0],this.index=a[1]);this.index instanceof L&&!this.index.isAssignable()&&
this.index.error("index cannot be a pattern matching expression");this.range=this.source instanceof L&&this.source.base instanceof Y&&!this.source.properties.length&&!this.from;this.pattern=this.name instanceof L;this.range&&this.index&&this.index.error("indexes do not apply to range loops");this.range&&this.pattern&&this.name.error("cannot pattern match over range loops");this.returns=!1}na(b,a);b.prototype.children=["body","source","guard","step"];b.prototype.compileNode=function(a){var b,f,d,e,
g,m,k,n,q,r,l,p,y,t,w,v,C,A,x,H,O;b=c.wrap([this.body]);q=b.expressions;q=q[q.length-1];(null!=q?q.jumps():void 0)instanceof U&&(this.returns=!1);w=this.range?this.source.base:this.source;d=a.scope;this.pattern||(n=this.name&&this.name.compile(a,h));q=this.index&&this.index.compile(a,h);n&&!this.pattern&&d.find(n);!q||this.index instanceof L||d.find(q);this.returns&&(k=d.freeVariable("results"));this.from?this.pattern&&(l=d.freeVariable("x",{single:!0})):l=this.object&&q||d.freeVariable("i",{single:!0});
p=(this.range||this.from)&&n||q||l;y=p!==l?p+" \x3d ":"";this.step&&!this.range&&(q=this.cacheToCodeFragments(this.step.cache(a,h,ta)),g=q[0],x=q[1],this.step.isNumber()&&(A=Number(x)));this.pattern&&(n=l);m=q=O="";r=this.tab+da;this.range?e=w.compileToFragments(Fa(a,{index:l,name:n,step:this.step,isComplex:ta})):(H=this.source.compile(a,h),!n&&!this.own||this.source.unwrap()instanceof z||(m+=""+this.tab+(w=d.freeVariable("ref"))+" \x3d "+H+";\n",H=w),!n||this.pattern||this.from||(t=n+" \x3d "+H+
"["+p+"]"),this.object||this.from||(g!==x&&(m+=""+this.tab+g+";\n"),n=0>A,this.step&&null!=A&&n||(f=d.freeVariable("len")),e=""+y+l+" \x3d 0, "+f+" \x3d "+H+".length",g=""+y+l+" \x3d "+H+".length - 1",f=l+" \x3c "+f,d=l+" \x3e\x3d 0",this.step?(null!=A?n&&(f=d,e=g):(f=x+" \x3e 0 ? "+f+" : "+d,e="("+x+" \x3e 0 ? ("+e+") : "+g+")"),l=l+" +\x3d "+x):l=""+(p!==l?"++"+l:l+"++"),e=[this.makeCode(e+"; "+f+"; "+y+l)]));this.returns&&(v=""+this.tab+k+" \x3d [];\n",C="\n"+this.tab+"return "+k+";",b.makeReturn(k));
this.guard&&(1<b.expressions.length?b.expressions.unshift(new E((new D(this.guard)).invert(),new ua("continue"))):this.guard&&(b=c.wrap([new E(this.guard,b)])));this.pattern&&b.expressions.unshift(new V(this.name,this.from?new z(p):new B(H+"["+p+"]")));k=[].concat(this.makeCode(m),this.pluckDirectCall(a,b));t&&(O="\n"+r+t+";");this.object?(e=[this.makeCode(p+" in "+H)],this.own&&(q="\n"+r+"if (!"+ya("hasProp",a)+".call("+H+", "+p+")) continue;")):this.from&&(e=[this.makeCode(p+" of "+H)]);(a=b.compileToFragments(Fa(a,
{indent:r}),u))&&0<a.length&&(a=[].concat(this.makeCode("\n"),a,this.makeCode("\n")));return[].concat(k,this.makeCode(""+(v||"")+this.tab+"for ("),e,this.makeCode(") {"+q+O),a,this.makeCode(this.tab+"}"+(C||"")))};b.prototype.pluckDirectCall=function(a,b){var c,d,e,h,n,m,k,q,r,l,y,t,w,v,B;d=[];r=b.expressions;n=m=0;for(k=r.length;m<k;n=++m)if(e=r[n],e=e.unwrapAll(),e instanceof g&&(B=null!=(l=e.variable)?l.unwrapAll():void 0,B instanceof p||B instanceof L&&(null!=(y=B.base)?y.unwrapAll():void 0)instanceof
p&&1===B.properties.length&&("call"===(t=null!=(w=B.properties[0].name)?w.value:void 0)||"apply"===t)))h=(null!=(v=B.base)?v.unwrapAll():void 0)||B,q=new z(a.scope.freeVariable("fn")),c=new L(q),B.base&&(c=[c,B],B.base=c[0],c=c[1]),b.expressions[n]=new g(c,e.args),d=d.concat(this.makeCode(this.tab),(new V(q,h)).compileToFragments(a,u),this.makeCode(";\n"));return d};return b}(w);e.Switch=function(a){function b(a,b,c){this.subject=a;this.cases=b;this.otherwise=c}na(b,a);b.prototype.children=["subject",
"cases","otherwise"];b.prototype.isStatement=fa;b.prototype.jumps=function(a){var b,c,d,e,g;null==a&&(a={block:!0});e=this.cases;c=0;for(d=e.length;c<d;c++)if(b=e[c],b=b[1],b=b.jumps(a))return b;return null!=(g=this.otherwise)?g.jumps(a):void 0};b.prototype.makeReturn=function(a){var b,f,d,e,g;e=this.cases;b=0;for(f=e.length;b<f;b++)d=e[b],d[1].makeReturn(a);a&&(this.otherwise||(this.otherwise=new c([new B("void 0")])));null!=(g=this.otherwise)&&g.makeReturn(a);return this};b.prototype.compileNode=
function(a){var b,c,d,e,g,h,m,k,n,q,r,l,p;m=a.indent+da;k=a.indent=m+da;h=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(a,O):this.makeCode("false"),this.makeCode(") {\n"));l=this.cases;g=n=0;for(q=l.length;n<q;g=++n){b=l[g];e=b[0];b=b[1];p=ma([e]);e=0;for(r=p.length;e<r;e++)d=p[e],this.subject||(d=d.invert()),h=h.concat(this.makeCode(m+"case "),d.compileToFragments(a,O),this.makeCode(":\n"));0<(c=b.compileToFragments(a,u)).length&&(h=h.concat(c,this.makeCode("\n")));
if(g===this.cases.length-1&&!this.otherwise)break;g=this.lastNonComment(b.expressions);g instanceof U||g instanceof B&&g.jumps()&&"debugger"!==g.value||h.push(d.makeCode(k+"break;\n"))}this.otherwise&&this.otherwise.expressions.length&&h.push.apply(h,[this.makeCode(m+"default:\n")].concat(Aa.call(this.otherwise.compileToFragments(a,u)),[this.makeCode("\n")]));h.push(this.makeCode(this.tab+"}"));return h};return b}(a);e.If=E=function(a){function b(a,b,c){this.body=b;null==c&&(c={});this.condition=
"unless"===c.type?a.invert():a;this.elseBody=null;this.isChain=!1;this.soak=c.soak}na(b,a);b.prototype.children=["condition","body","elseBody"];b.prototype.bodyNode=function(){var a;return null!=(a=this.body)?a.unwrap():void 0};b.prototype.elseBodyNode=function(){var a;return null!=(a=this.elseBody)?a.unwrap():void 0};b.prototype.addElse=function(a){this.isChain?this.elseBodyNode().addElse(a):(this.isChain=a instanceof b,this.elseBody=this.ensureBlock(a),this.elseBody.updateLocationDataIfMissing(a.locationData));
return this};b.prototype.isStatement=function(a){var b;return(null!=a?a.level:void 0)===u||this.bodyNode().isStatement(a)||(null!=(b=this.elseBodyNode())?b.isStatement(a):void 0)};b.prototype.jumps=function(a){var b;return this.body.jumps(a)||(null!=(b=this.elseBody)?b.jumps(a):void 0)};b.prototype.compileNode=function(a){return this.isStatement(a)?this.compileStatement(a):this.compileExpression(a)};b.prototype.makeReturn=function(a){a&&(this.elseBody||(this.elseBody=new c([new B("void 0")])));this.body&&
(this.body=new c([this.body.makeReturn(a)]));this.elseBody&&(this.elseBody=new c([this.elseBody.makeReturn(a)]));return this};b.prototype.ensureBlock=function(a){return a instanceof c?a:new c([a])};b.prototype.compileStatement=function(a){var c,f,d,e;c=X(a,"chainChild");if(X(a,"isExistentialEquals"))return(new b(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(a);e=a.indent+da;d=this.condition.compileToFragments(a,O);f=this.ensureBlock(this.body).compileToFragments(Fa(a,
{indent:e}));f=[].concat(this.makeCode("if ("),d,this.makeCode(") {\n"),f,this.makeCode("\n"+this.tab+"}"));c||f.unshift(this.makeCode(this.tab));if(!this.elseBody)return f;c=f.concat(this.makeCode(" else "));this.isChain?(a.chainChild=!0,c=c.concat(this.elseBody.unwrap().compileToFragments(a,u))):c=c.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(Fa(a,{indent:e}),u),this.makeCode("\n"+this.tab+"}"));return c};b.prototype.compileExpression=function(a){var b,c,d;d=this.condition.compileToFragments(a,
r);c=this.bodyNode().compileToFragments(a,h);b=this.elseBodyNode()?this.elseBodyNode().compileToFragments(a,h):[this.makeCode("void 0")];b=d.concat(this.makeCode(" ? "),c,this.makeCode(" : "),b);return a.level>=r?this.wrapInBraces(b):b};b.prototype.unfoldSoak=function(){return this.soak&&this};return b}(a);ka={extend:function(a){return"function(child, parent) { for (var key in parent) { if ("+ya("hasProp",a)+".call(parent, key)) child[key] \x3d parent[key]; } function ctor() { this.constructor \x3d child; } ctor.prototype \x3d parent.prototype; child.prototype \x3d new ctor(); child.__super__ \x3d parent.prototype; return child; }"},
bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i \x3d 0, l \x3d this.length; i \x3c l; i++) { if (i in this \x26\x26 this[i] \x3d\x3d\x3d item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b \x3d +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}};u=1;O=2;h=3;r=4;y=5;q=6;da=" ";aa=/^[+-]?\d+$/;ya=
function(a,b){var c,e;e=b.scope.root;if(a in e.utilities)return e.utilities[a];c=e.freeVariable(a);e.assign(c,ka[a](b));return e.utilities[a]=c};Na=function(a,b){a=a.replace(/\n/g,"$\x26"+b);return a.replace(/\s+$/,"")};gb=function(a){return a instanceof z&&"arguments"===a.value};Ra=function(a){return a instanceof ha||a instanceof p&&a.bound||a instanceof ja};ta=function(a){return a.isComplex()||("function"===typeof a.isAssignable?a.isAssignable():void 0)};Ka=function(a,b,c){if(a=b[c].unfoldSoak(a))return b[c]=
a.body,a.body=new L(b),a}}).call(this);return e}();t["./sourcemap"]=function(){var e={};(function(){var t;t=function(){function e(e){this.line=e;this.columns=[]}e.prototype.add=function(e,a,c){var t;t=a[0];a=a[1];null==c&&(c={});if(!this.columns[e]||!c.noReplace)return this.columns[e]={line:this.line,column:e,sourceLine:t,sourceColumn:a}};e.prototype.sourceLocation=function(e){for(var a;!((a=this.columns[e])||0>=e);)e--;return a&&[a.sourceLine,a.sourceColumn]};return e}();e=function(){function e(){this.lines=
[]}e.prototype.add=function(e,a,c){var V,g;null==c&&(c={});g=a[0];a=a[1];return((V=this.lines)[g]||(V[g]=new t(g))).add(a,e,c)};e.prototype.sourceLocation=function(e){var a,c;a=e[0];for(e=e[1];!((c=this.lines[a])||0>=a);)a--;return c&&c.sourceLocation(e)};e.prototype.generate=function(e,a){var c,t,g,v,p,l,G,F,x,w,K,M,I;null==e&&(e={});null==a&&(a=null);p=l=v=I=0;w=!1;c="";K=this.lines;g=t=0;for(G=K.length;t<G;g=++t)if(g=K[g])for(M=g.columns,g=0,F=M.length;g<F;g++)if(x=M[g]){for(;I<x.line;)v=0,w=!1,
c+=";",I++;w&&(c+=",");c+=this.encodeVlq(x.column-v);v=x.column;c+=this.encodeVlq(0);c+=this.encodeVlq(x.sourceLine-l);l=x.sourceLine;c+=this.encodeVlq(x.sourceColumn-p);p=x.sourceColumn;w=!0}c={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:c};e.inlineMap&&(c.sourcesContent=[a]);return c};e.prototype.encodeVlq=function(e){var a,c;a="";for(c=(Math.abs(e)<<1)+(0>e?1:0);c||!a;)e=c&31,(c>>=5)&&(e|=32),a+=this.encodeBase64(e);return a};e.prototype.encodeBase64=
function(e){var a;if(!(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]))throw Error("Cannot Base64 encode value: "+e);return a};return e}()}).call(this);return e}();t["./coffee-script"]=function(){var e={};(function(){var pa,ua,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E,N={}.hasOwnProperty;v=t("fs");E=t("vm");K=t("path");pa=t("./lexer").Lexer;w=t("./parser").parser;l=t("./helpers");ua=t("./sourcemap");c=t("../../package.json");e.VERSION=c.version;e.FILE_EXTENSIONS=[".coffee",".litcoffee",
".coffee.md"];e.helpers=l;V=function(a){switch(!1){case "function"!==typeof Buffer:return(new Buffer(a)).toString("base64");case "function"!==typeof btoa:return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,c){return String.fromCharCode("0x"+c)}));default:throw Error("Unable to base64 encode inline sourcemap.");}};c=function(a){return function(c,e){null==e&&(e={});try{return a.call(this,c,e)}catch(r){if("string"!==typeof c)throw r;throw l.updateSyntaxError(r,c,e.filename);}}};z=
{};I={};e.compile=a=c(function(a,c){var e,g,h,k,m,p,t,v,E,H,F,G,C;h=l.extend;c=h({},c);p=c.sourceMap||c.inlineMap||null==c.filename;h=c.filename||"\x3canonymous\x3e";z[h]=a;p&&(H=new ua);g=x.tokenize(a,c);k=c;E=[];m=0;for(t=g.length;m<t;m++)e=g[m],"IDENTIFIER"===e[0]&&E.push(e[1]);k.referencedVars=E;if(null==c.bare||!0!==c.bare)for(k=0,m=g.length;k<m;k++)if(e=g[k],"IMPORT"===(v=e[0])||"EXPORT"===v){c.bare=!0;break}m=w.parse(g).compileToFragments(c);g=0;c.header&&(g+=1);c.shiftLine&&(g+=1);e=0;v="";
t=0;for(E=m.length;t<E;t++)k=m[t],p&&(k.locationData&&!/^[;\s]*$/.test(k.code)&&H.add([k.locationData.first_line,k.locationData.first_column],[g,e],{noReplace:!0}),F=l.count(k.code,"\n"),g+=F,e=F?k.code.length-(k.code.lastIndexOf("\n")+1):e+k.code.length),v+=k.code;c.header&&(e="Generated by CoffeeScript "+this.VERSION,v="// "+e+"\n"+v);p&&(C=H.generate(c,a),I[h]=H);c.inlineMap&&(a=V(JSON.stringify(C)),h="//# sourceURL\x3d"+(null!=(G=c.filename)?G:"coffeescript"),v=v+"\n"+("//# sourceMappingURL\x3ddata:application/json;base64,"+
a)+"\n"+h);return c.sourceMap?{js:v,sourceMap:H,v3SourceMap:JSON.stringify(C,null,2)}:v});e.tokens=c(function(a,c){return x.tokenize(a,c)});e.nodes=c(function(a,c){return"string"===typeof a?w.parse(x.tokenize(a,c)):w.parse(a)});e.run=function(c,e){var g,k,h;null==e&&(e={});k=t.main;k.filename=process.argv[1]=e.filename?v.realpathSync(e.filename):"\x3canonymous\x3e";k.moduleCache&&(k.moduleCache={});g=null!=e.filename?K.dirname(v.realpathSync(e.filename)):v.realpathSync(".");k.paths=t("module")._nodeModulePaths(g);
if(!l.isCoffee(k.filename)||t.extensions)c=a(c,e),c=null!=(h=c.js)?h:c;return k._compile(c,k.filename)};e.eval=function(c,e){var g,k,h,m,l,p,w,v,z,x;null==e&&(e={});if(c=c.trim()){m=null!=(l=E.Script.createContext)?l:E.createContext;l=null!=(h=E.isContext)?h:function(a){return e.sandbox instanceof m().constructor};if(m){if(null!=e.sandbox){if(l(e.sandbox))x=e.sandbox;else for(p in x=m(),l=e.sandbox,l)N.call(l,p)&&(h=l[p],x[p]=h);x.global=x.root=x.GLOBAL=x}else x=global;x.__filename=e.filename||"eval";
x.__dirname=K.dirname(x.__filename);if(x===global&&!x.module&&!x.require){g=t("module");x.module=k=new g(e.modulename||"eval");x.require=h=function(a){return g._load(a,k,!0)};k.filename=x.__filename;z=Object.getOwnPropertyNames(t);l=0;for(w=z.length;l<w;l++)v=z[l],"paths"!==v&&"arguments"!==v&&"caller"!==v&&(h[v]=t[v]);h.paths=k.paths=g._nodeModulePaths(process.cwd());h.resolve=function(a){return g._resolveFilename(a,k)}}}l={};for(p in e)N.call(e,p)&&(h=e[p],l[p]=h);l.bare=!0;c=a(c,l);return x===
global?E.runInThisContext(c):E.runInContext(c,x)}};e.register=function(){return t("./register")};if(t.extensions)for(M=this.FILE_EXTENSIONS,Da=function(a){var c;return null!=(c=t.extensions)[a]?c[a]:c[a]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+a+" files.");}},G=0,F=M.length;G<F;G++)c=M[G],Da(c);e._compileFile=function(c,e,g){var k,h;null==e&&(e=!1);null==g&&(g=!1);h=v.readFileSync(c,"utf8");h=65279===h.charCodeAt(0)?h.substring(1):
h;try{k=a(h,{filename:c,sourceMap:e,inlineMap:g,sourceFiles:[c],literate:l.isLiterate(c)})}catch(y){throw l.updateSyntaxError(y,h,c);}return k};x=new pa;w.lexer={lex:function(){var a,c;(c=w.tokens[this.pos++])?(a=c[0],this.yytext=c[1],this.yylloc=c[2],w.errorToken=c.origin||c,this.yylineno=this.yylloc.first_line):a="";return a},setInput:function(a){w.tokens=a;return this.pos=0},upcomingInput:function(){return""}};w.yy=t("./nodes");w.yy.parseError=function(a,c){var e,g,h,k;h=w.errorToken;k=w.tokens;
e=h[0];g=h[1];a=h[2];g=function(){switch(!1){case h!==k[k.length-1]:return"end of input";case "INDENT"!==e&&"OUTDENT"!==e:return"indentation";case "IDENTIFIER"!==e&&"NUMBER"!==e&&"INFINITY"!==e&&"STRING"!==e&&"STRING_START"!==e&&"REGEX"!==e&&"REGEX_START"!==e:return e.replace(/_START$/,"").toLowerCase();default:return l.nameWhitespaceCharacter(g)}}();return l.throwSyntaxError("unexpected "+g,a)};g=function(a,c){var e,g,h,k;a.isNative()?e="native":(a.isEval()?(g=a.getScriptNameOrSourceURL())||a.getEvalOrigin():
g=a.getFileName(),g||(g="\x3canonymous\x3e"),h=a.getLineNumber(),e=a.getColumnNumber(),e=(c=c(g,h,e))?g+":"+c[0]+":"+c[1]:g+":"+h+":"+e);g=a.getFunctionName();h=a.isConstructor();if(a.isToplevel()||h)return h?"new "+(g||"\x3canonymous\x3e")+" ("+e+")":g?g+" ("+e+")":e;h=a.getMethodName();k=a.getTypeName();return g?(c=a="",k&&g.indexOf(k)&&(c=k+"."),h&&g.indexOf("."+h)!==g.length-h.length-1&&(a=" [as "+h+"]"),""+c+g+a+" ("+e+")"):k+"."+(h||"\x3canonymous\x3e")+" ("+e+")"};p=function(c){return null!=
I[c]?I[c]:null!=I["\x3canonymous\x3e"]?I["\x3canonymous\x3e"]:null!=z[c]?(c=a(z[c],{filename:c,sourceMap:!0,literate:l.isLiterate(c)}),c.sourceMap):null};Error.prepareStackTrace=function(a,c){var k,m,h;h=function(a,c,e){var g;a=p(a);null!=a&&(g=a.sourceLocation([c-1,e-1]));return null!=g?[g[0]+1,g[1]+1]:null};m=function(){var a,m,l;l=[];a=0;for(m=c.length;a<m;a++){k=c[a];if(k.getFunction()===e.run)break;l.push(" at "+g(k,h))}return l}();return a.toString()+"\n"+m.join("\n")+"\n"}}).call(this);
return e}();t["./browser"]=function(){(function(){var e,pa,ua,V=[].indexOf||function(a){for(var c=0,e=this.length;c<e;c++)if(c in this&&this[c]===a)return c;return-1};e=t("./coffee-script");e.require=t;pa=e.compile;e.eval=function(a,c){null==c&&(c={});null==c.bare&&(c.bare=!0);return eval(pa(a,c))};e.run=function(a,c){null==c&&(c={});c.bare=!0;c.shiftLine=!0;return Function(pa(a,c))()};"undefined"!==typeof window&&null!==window&&("undefined"!==typeof btoa&&null!==btoa&&"undefined"!==typeof JSON&&
null!==JSON&&(pa=function(a,c){null==c&&(c={});c.inlineMap=!0;return e.compile(a,c)}),e.load=function(a,c,t,g){var v;null==t&&(t={});null==g&&(g=!1);t.sourceFiles=[a];v=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest;v.open("GET",a,!0);"overrideMimeType"in v&&v.overrideMimeType("text/plain");v.onreadystatechange=function(){var p;if(4===v.readyState){if(0===(p=v.status)||200===p)p=[v.responseText,t],g||e.run.apply(e,p);else throw Error("Could not load "+
a);if(c)return c(p)}};return v.send(null)},ua=function(){var a,c,t,g,v,p,l,G,F,x,w;w=window.document.getElementsByTagName("script");c=["text/coffeescript","text/literate-coffeescript"];a=function(){var a,e,g,l;l=[];a=0;for(e=w.length;a<e;a++)F=w[a],(g=F.type,0<=V.call(c,g))&&l.push(F);return l}();p=0;t=function(){var c;c=a[p];if(c instanceof Array)return e.run.apply(e,c),p++,t()};g=function(g,l){var p,v;p={literate:g.type===c[1]};if(v=g.src||g.getAttribute("data-src"))return e.load(v,function(c){a[l]=
c;return t()},p,!0);p.sourceFiles=["embedded"];return a[l]=[g.innerHTML,p]};v=l=0;for(G=a.length;l<G;v=++l)x=a[v],g(x,v);return t()},window.addEventListener?window.addEventListener("DOMContentLoaded",ua,!1):window.attachEvent("onload",ua))}).call(this);return{}}();return t["./coffee-script"]}();"function"===typeof define&&define.amd?define(function(){return ua}):t.CoffeeScript=ua})(this);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,319 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>browser.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>browser.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>This <strong>Browser</strong> compatibility layer extends core CoffeeScript functions
to make things work smoothly when compiling code directly in the browser.
We add support for loading remote Coffee scripts via <strong>XHR</strong>, and
<code>text/coffeescript</code> script tags, source maps via data-URLs, and so on.</p>
</div>
<div class="content"><div class='highlight'><pre>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
CoffeeScript.<span class="hljs-built_in">require</span> = <span class="hljs-built_in">require</span>
compile = CoffeeScript.compile</pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Use standard JavaScript <code>eval</code> to eval code.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.eval = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
options.bare ?= <span class="hljs-literal">on</span>
eval compile code, options</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Running code does not provide access to this scope.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.run = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
options.bare = <span class="hljs-literal">on</span>
options.shiftLine = <span class="hljs-literal">on</span>
Function(compile code, options)()</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>If were not in a browser environment, were finished with the public API.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> <span class="hljs-built_in">window</span>?</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Include source maps where possible. If weve got a base64 encoder, a
JSON serializer, and tools for escaping unicode characters, were good to go.
Ported from <a href="https://developer.mozilla.org/en-US/docs/DOM/window.btoa">https://developer.mozilla.org/en-US/docs/DOM/window.btoa</a></p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> btoa? <span class="hljs-keyword">and</span> JSON?
<span class="hljs-function"> <span class="hljs-title">compile</span> = <span class="hljs-params">(code, options = {})</span> -&gt;</span>
options.inlineMap = <span class="hljs-literal">true</span>
CoffeeScript.compile code, options</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Load a remote script from the current domain via XHR.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.load = <span class="hljs-function"><span class="hljs-params">(url, callback, options = {}, hold = <span class="hljs-literal">false</span>)</span> -&gt;</span>
options.sourceFiles = [url]
xhr = <span class="hljs-keyword">if</span> <span class="hljs-built_in">window</span>.ActiveXObject
<span class="hljs-keyword">new</span> <span class="hljs-built_in">window</span>.ActiveXObject(<span class="hljs-string">'Microsoft.XMLHTTP'</span>)
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">new</span> <span class="hljs-built_in">window</span>.XMLHttpRequest()
xhr.open <span class="hljs-string">'GET'</span>, url, <span class="hljs-literal">true</span>
xhr.overrideMimeType <span class="hljs-string">'text/plain'</span> <span class="hljs-keyword">if</span> <span class="hljs-string">'overrideMimeType'</span> <span class="hljs-keyword">of</span> xhr
xhr.onreadystatechange = <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">if</span> xhr.readyState <span class="hljs-keyword">is</span> <span class="hljs-number">4</span>
<span class="hljs-keyword">if</span> xhr.status <span class="hljs-keyword">in</span> [<span class="hljs-number">0</span>, <span class="hljs-number">200</span>]
param = [xhr.responseText, options]
CoffeeScript.run param... <span class="hljs-keyword">unless</span> hold
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"Could not load <span class="hljs-subst">#{url}</span>"</span>
callback param <span class="hljs-keyword">if</span> callback
xhr.send <span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Activate CoffeeScript in the browser by having it compile and evaluate
all script tags with a content-type of <code>text/coffeescript</code>.
This happens on page load.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">runScripts</span> = -&gt;</span>
scripts = <span class="hljs-built_in">window</span>.<span class="hljs-built_in">document</span>.getElementsByTagName <span class="hljs-string">'script'</span>
coffeetypes = [<span class="hljs-string">'text/coffeescript'</span>, <span class="hljs-string">'text/literate-coffeescript'</span>]
coffees = (s <span class="hljs-keyword">for</span> s <span class="hljs-keyword">in</span> scripts <span class="hljs-keyword">when</span> s.type <span class="hljs-keyword">in</span> coffeetypes)
index = <span class="hljs-number">0</span>
<span class="hljs-function">
<span class="hljs-title">execute</span> = -&gt;</span>
param = coffees[index]
<span class="hljs-keyword">if</span> param <span class="hljs-keyword">instanceof</span> Array
CoffeeScript.run param...
index++
execute()
<span class="hljs-keyword">for</span> script, i <span class="hljs-keyword">in</span> coffees
<span class="hljs-keyword">do</span> (script, i) -&gt;
options = literate: script.type <span class="hljs-keyword">is</span> coffeetypes[<span class="hljs-number">1</span>]
source = script.src <span class="hljs-keyword">or</span> script.getAttribute(<span class="hljs-string">'data-src'</span>)
<span class="hljs-keyword">if</span> source
options.filename = source
CoffeeScript.load source,
<span class="hljs-function"><span class="hljs-params">(param)</span> -&gt;</span>
coffees[i] = param
execute()
options
<span class="hljs-literal">true</span>
<span class="hljs-keyword">else</span></pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p><code>options.filename</code> defines the filename the source map appears as
in Developer Tools. If a script tag has an <code>id</code>, use that as the
filename; otherwise use <code>coffeescript</code>, or <code>coffeescript1</code> etc.,
leaving the first one unnumbered for the common case that theres
only one CoffeeScript script block to parse.</p>
</div>
<div class="content"><div class='highlight'><pre> options.filename = <span class="hljs-keyword">if</span> script.id <span class="hljs-keyword">and</span> script.id <span class="hljs-keyword">isnt</span> <span class="hljs-string">''</span> <span class="hljs-keyword">then</span> script.id <span class="hljs-keyword">else</span> <span class="hljs-string">"coffeescript<span class="hljs-subst">#{<span class="hljs-keyword">if</span> i <span class="hljs-keyword">isnt</span> <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> i <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>}</span>"</span>
options.sourceFiles = [<span class="hljs-string">'embedded'</span>]
coffees[i] = [script.innerHTML, options]
execute()</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Listen for window load, both in decent browsers and in IE.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">window</span>.addEventListener
<span class="hljs-built_in">window</span>.addEventListener <span class="hljs-string">'DOMContentLoaded'</span>, runScripts, <span class="hljs-literal">no</span>
<span class="hljs-keyword">else</span>
<span class="hljs-built_in">window</span>.attachEvent <span class="hljs-string">'onload'</span>, runScripts</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,345 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>cake.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>cake.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p><code>cake</code> is a simplified version of <a href="http://www.gnu.org/software/make/">Make</a>
(<a href="http://rake.rubyforge.org/">Rake</a>, <a href="http://github.com/280north/jake">Jake</a>)
for CoffeeScript. You define tasks with names and descriptions in a Cakefile,
and can call them from the command line, or invoke them from other tasks.</p>
<p>Running <code>cake</code> with no arguments will print out a list of all the tasks in the
current directorys Cakefile.</p>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>External dependencies.</p>
</div>
<div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Register .coffee extension</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.register()</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Keep track of the list of defined tasks, the accepted options, and so on.</p>
</div>
<div class="content"><div class='highlight'><pre>tasks = {}
options = {}
switches = []
oparse = <span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Mixin the top-level Cake functions for Cakefiles to use directly.</p>
</div>
<div class="content"><div class='highlight'><pre>helpers.extend <span class="hljs-built_in">global</span>,</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Define a Cake task with a short name, an optional sentence description,
and the function to run as the action itself.</p>
</div>
<div class="content"><div class='highlight'><pre> task: <span class="hljs-function"><span class="hljs-params">(name, description, action)</span> -&gt;</span>
[action, description] = [description, action] <span class="hljs-keyword">unless</span> action
tasks[name] = {name, description, action}</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Define an option that the Cakefile accepts. The parsed options hash,
containing all of the command-line options passed, will be made available
as the first argument to the action.</p>
</div>
<div class="content"><div class='highlight'><pre> option: <span class="hljs-function"><span class="hljs-params">(letter, flag, description)</span> -&gt;</span>
switches.push [letter, flag, description]</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Invoke another task in the current Cakefile.</p>
</div>
<div class="content"><div class='highlight'><pre> invoke: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
missingTask name <span class="hljs-keyword">unless</span> tasks[name]
tasks[name].action options</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Run <code>cake</code>. Executes all of the tasks you pass, in order. Note that Nodes
asynchrony may cause tasks to execute in a different order than youd expect.
If no tasks are passed, print the help screen. Keep a reference to the
original directory name, when running Cake tasks from subdirectories.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function">-&gt;</span>
<span class="hljs-built_in">global</span>.__originalDirname = fs.realpathSync <span class="hljs-string">'.'</span>
process.chdir cakefileDirectory __originalDirname
args = process.argv[<span class="hljs-number">2.</span>.]
CoffeeScript.run fs.readFileSync(<span class="hljs-string">'Cakefile'</span>).toString(), filename: <span class="hljs-string">'Cakefile'</span>
oparse = <span class="hljs-keyword">new</span> optparse.OptionParser switches
<span class="hljs-keyword">return</span> printTasks() <span class="hljs-keyword">unless</span> args.length
<span class="hljs-keyword">try</span>
options = oparse.parse(args)
<span class="hljs-keyword">catch</span> e
<span class="hljs-keyword">return</span> fatalError <span class="hljs-string">"<span class="hljs-subst">#{e}</span>"</span>
invoke arg <span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> options.arguments</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Display the list of Cake tasks in a format similar to <code>rake -T</code></p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">printTasks</span> = -&gt;</span>
relative = path.relative <span class="hljs-keyword">or</span> path.resolve
cakefilePath = path.join relative(__originalDirname, process.cwd()), <span class="hljs-string">'Cakefile'</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"<span class="hljs-subst">#{cakefilePath}</span> defines the following tasks:\n"</span>
<span class="hljs-keyword">for</span> name, task <span class="hljs-keyword">of</span> tasks
spaces = <span class="hljs-number">20</span> - name.length
spaces = <span class="hljs-keyword">if</span> spaces &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> Array(spaces + <span class="hljs-number">1</span>).join(<span class="hljs-string">' '</span>) <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
desc = <span class="hljs-keyword">if</span> task.description <span class="hljs-keyword">then</span> <span class="hljs-string">"# <span class="hljs-subst">#{task.description}</span>"</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"cake <span class="hljs-subst">#{name}</span><span class="hljs-subst">#{spaces}</span> <span class="hljs-subst">#{desc}</span>"</span>
<span class="hljs-built_in">console</span>.log oparse.help() <span class="hljs-keyword">if</span> switches.length</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Print an error and exit when attempting to use an invalid task/option.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">fatalError</span> = <span class="hljs-params">(message)</span> -&gt;</span>
<span class="hljs-built_in">console</span>.error message + <span class="hljs-string">'\n'</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">'To see a list of all tasks/options, run "cake"'</span>
process.exit <span class="hljs-number">1</span>
<span class="hljs-function">
<span class="hljs-title">missingTask</span> = <span class="hljs-params">(task)</span> -&gt;</span> fatalError <span class="hljs-string">"No such task: <span class="hljs-subst">#{task}</span>"</span></pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>When <code>cake</code> is invoked, search in the current and all parent directories
to find the relevant Cakefile.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">cakefileDirectory</span> = <span class="hljs-params">(dir)</span> -&gt;</span>
<span class="hljs-keyword">return</span> dir <span class="hljs-keyword">if</span> fs.existsSync path.join dir, <span class="hljs-string">'Cakefile'</span>
parent = path.normalize path.join dir, <span class="hljs-string">'..'</span>
<span class="hljs-keyword">return</span> cakefileDirectory parent <span class="hljs-keyword">unless</span> parent <span class="hljs-keyword">is</span> dir
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"Cakefile not found in <span class="hljs-subst">#{process.cwd()}</span>"</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,982 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>coffeescript.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>coffeescript.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>CoffeeScript can be used both on the server, as a command-line compiler based
on Node.js/V8, or to run CoffeeScript directly in the browser. This module
contains the main entry functions for tokenizing, parsing, and compiling
source CoffeeScript into JavaScript.</p>
</div>
<div class="content"><div class='highlight'><pre>
fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
{Lexer} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./lexer'</span>
{parser} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./parser'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
SourceMap = <span class="hljs-built_in">require</span> <span class="hljs-string">'./sourcemap'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Require <code>package.json</code>, which is two levels above this file, as this file is
evaluated from <code>lib/coffeescript</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>packageJson = <span class="hljs-built_in">require</span> <span class="hljs-string">'../../package.json'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>The current CoffeeScript version number.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.VERSION = packageJson.version
exports.FILE_EXTENSIONS = [<span class="hljs-string">'.coffee'</span>, <span class="hljs-string">'.litcoffee'</span>, <span class="hljs-string">'.coffee.md'</span>]</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Expose helpers for testing.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.helpers = helpers</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Function that allows for btoa in both nodejs and the browser.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">base64encode</span> = <span class="hljs-params">(src)</span> -&gt;</span> <span class="hljs-keyword">switch</span>
<span class="hljs-keyword">when</span> <span class="hljs-keyword">typeof</span> Buffer <span class="hljs-keyword">is</span> <span class="hljs-string">'function'</span>
Buffer.<span class="hljs-keyword">from</span>(src).toString(<span class="hljs-string">'base64'</span>)
<span class="hljs-keyword">when</span> <span class="hljs-keyword">typeof</span> btoa <span class="hljs-keyword">is</span> <span class="hljs-string">'function'</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>The contents of a <code>&lt;script&gt;</code> block are encoded via UTF-16, so if any extended
characters are used in the block, btoa will fail as it maxes out at UTF-8.
See <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem">https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem</a>
for the gory details, and for the solution implemented here.</p>
</div>
<div class="content"><div class='highlight'><pre> btoa encodeURIComponent(src).replace <span class="hljs-regexp">/%([0-9A-F]{2})/g</span>, <span class="hljs-function"><span class="hljs-params">(match, p1)</span> -&gt;</span>
String.fromCharCode <span class="hljs-string">'0x'</span> + p1
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error(<span class="hljs-string">'Unable to base64 encode inline sourcemap.'</span>)</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Function wrapper to add source file information to SyntaxErrors thrown by the
lexer/parser/compiler.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">withPrettyErrors</span> = <span class="hljs-params">(fn)</span> -&gt;</span>
(code, options = {}) -&gt;
<span class="hljs-keyword">try</span>
fn.call @, code, options
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">if</span> <span class="hljs-keyword">typeof</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'string'</span> <span class="hljs-comment"># Support `CoffeeScript.nodes(tokens)`.</span>
<span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, code, options.filename</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>For each compiled file, save its source in memory in case we need to
recompile it later. We might need to recompile if the first compilation
didnt create a source map (faster) but something went wrong and we need
a stack trace. Assuming that most of the time, code isnt throwing
exceptions, its probably more efficient to compile twice only when we
need a stack trace, rather than always generating a source map even when
its not likely to be used. Save in form of <code>filename</code>: <code>(source)</code></p>
</div>
<div class="content"><div class='highlight'><pre>sources = {}</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Also save source maps if generated, in form of <code>filename</code>: <code>(source map)</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>sourceMaps = {}</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Compile CoffeeScript code to JavaScript, using the Coffee/Jison compiler.</p>
<p>If <code>options.sourceMap</code> is specified, then <code>options.filename</code> must also be
specified. All options that can be passed to <code>SourceMap#generate</code> may also
be passed here.</p>
<p>This returns a javascript string, unless <code>options.sourceMap</code> is passed,
in which case this returns a <code>{js, v3SourceMap, sourceMap}</code>
object, where sourceMap is a sourcemap.coffee#SourceMap object, handy for
doing programmatic lookups.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.compile = compile = withPrettyErrors (code, options) -&gt;
{merge, extend} = helpers
options = extend {}, options</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Always generate a source map if no filename is passed in, since without a
a filename we have no way to retrieve this source later in the event that
we need to recompile it to get a source map for <code>prepareStackTrace</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> generateSourceMap = options.sourceMap <span class="hljs-keyword">or</span> options.inlineMap <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> options.filename?
filename = options.filename <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>
sources[filename] = code
map = <span class="hljs-keyword">new</span> SourceMap <span class="hljs-keyword">if</span> generateSourceMap
tokens = lexer.tokenize code, options</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Pass a list of referenced variables, so that generated variables wont get
the same name.</p>
</div>
<div class="content"><div class='highlight'><pre> options.referencedVars = (
token[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">when</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>
)</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Check for import or export; if found, force bare mode.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> options.bare? <span class="hljs-keyword">and</span> options.bare <span class="hljs-keyword">is</span> <span class="hljs-literal">yes</span>
<span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens
<span class="hljs-keyword">if</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">'IMPORT'</span>, <span class="hljs-string">'EXPORT'</span>]
options.bare = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">break</span>
fragments = parser.parse(tokens).compileToFragments options
currentLine = <span class="hljs-number">0</span>
currentLine += <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> options.header
currentLine += <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> options.shiftLine
currentColumn = <span class="hljs-number">0</span>
js = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> fragment <span class="hljs-keyword">in</span> fragments</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Update the sourcemap with data from each fragment.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> generateSourceMap</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Do not include empty, whitespace, or semicolon-only fragments.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> fragment.locationData <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> <span class="hljs-regexp">/^[;\s]*$/</span>.test fragment.code
map.add(
[fragment.locationData.first_line, fragment.locationData.first_column]
[currentLine, currentColumn]
{noReplace: <span class="hljs-literal">true</span>})
newLines = helpers.count fragment.code, <span class="hljs-string">"\n"</span>
currentLine += newLines
<span class="hljs-keyword">if</span> newLines
currentColumn = fragment.code.length - (fragment.code.lastIndexOf(<span class="hljs-string">"\n"</span>) + <span class="hljs-number">1</span>)
<span class="hljs-keyword">else</span>
currentColumn += fragment.code.length</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Copy the code from each fragment into the final JavaScript.</p>
</div>
<div class="content"><div class='highlight'><pre> js += fragment.code
<span class="hljs-keyword">if</span> options.header
header = <span class="hljs-string">"Generated by CoffeeScript <span class="hljs-subst">#{@VERSION}</span>"</span>
js = <span class="hljs-string">"// <span class="hljs-subst">#{header}</span>\n<span class="hljs-subst">#{js}</span>"</span>
<span class="hljs-keyword">if</span> generateSourceMap
v3SourceMap = map.generate(options, code)
sourceMaps[filename] = map
<span class="hljs-keyword">if</span> options.inlineMap
encoded = base64encode JSON.stringify v3SourceMap
sourceMapDataURI = <span class="hljs-string">"//# sourceMappingURL=data:application/json;base64,<span class="hljs-subst">#{encoded}</span>"</span>
sourceURL = <span class="hljs-string">"//# sourceURL=<span class="hljs-subst">#{options.filename ? <span class="hljs-string">'coffeescript'</span>}</span>"</span>
js = <span class="hljs-string">"<span class="hljs-subst">#{js}</span>\n<span class="hljs-subst">#{sourceMapDataURI}</span>\n<span class="hljs-subst">#{sourceURL}</span>"</span>
<span class="hljs-keyword">if</span> options.sourceMap
{
js
sourceMap: map
v3SourceMap: JSON.stringify v3SourceMap, <span class="hljs-literal">null</span>, <span class="hljs-number">2</span>
}
<span class="hljs-keyword">else</span>
js</pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Tokenize a string of CoffeeScript code, and return the array of tokens.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.tokens = withPrettyErrors (code, options) -&gt;
lexer.tokenize code, options</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Parse a string of CoffeeScript code or an array of lexed tokens, and
return the AST. You can then compile it by calling <code>.compile()</code> on the root,
or traverse it by using <code>.traverseChildren()</code> with a callback.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.nodes = withPrettyErrors (source, options) -&gt;
<span class="hljs-keyword">if</span> <span class="hljs-keyword">typeof</span> source <span class="hljs-keyword">is</span> <span class="hljs-string">'string'</span>
parser.parse lexer.tokenize source, options
<span class="hljs-keyword">else</span>
parser.parse source</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Compile and execute a string of CoffeeScript (on the server), correctly
setting <code>__filename</code>, <code>__dirname</code>, and relative <code>require()</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
mainModule = <span class="hljs-built_in">require</span>.main</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Set the filename.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.filename = process.argv[<span class="hljs-number">1</span>] =
<span class="hljs-keyword">if</span> options.filename <span class="hljs-keyword">then</span> fs.realpathSync(options.filename) <span class="hljs-keyword">else</span> <span class="hljs-string">'&lt;anonymous&gt;'</span></pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Clear the module cache.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.moduleCache <span class="hljs-keyword">and</span>= {}</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Assign paths for node_modules loading</p>
</div>
<div class="content"><div class='highlight'><pre> dir = <span class="hljs-keyword">if</span> options.filename?
path.dirname fs.realpathSync options.filename
<span class="hljs-keyword">else</span>
fs.realpathSync <span class="hljs-string">'.'</span>
mainModule.paths = <span class="hljs-built_in">require</span>(<span class="hljs-string">'module'</span>)._nodeModulePaths dir</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Compile.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> helpers.isCoffee(mainModule.filename) <span class="hljs-keyword">or</span> <span class="hljs-built_in">require</span>.extensions
answer = compile code, options
code = answer.js ? answer
mainModule._compile code, mainModule.filename</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
The CoffeeScript REPL uses this to run the input.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.eval = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> code = code.trim()
createContext = vm.Script.createContext ? vm.createContext
isContext = vm.isContext ? (ctx) -&gt;
options.sandbox <span class="hljs-keyword">instanceof</span> createContext().constructor
<span class="hljs-keyword">if</span> createContext
<span class="hljs-keyword">if</span> options.sandbox?
<span class="hljs-keyword">if</span> isContext options.sandbox
sandbox = options.sandbox
<span class="hljs-keyword">else</span>
sandbox = createContext()
sandbox[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options.sandbox
sandbox.<span class="hljs-built_in">global</span> = sandbox.root = sandbox.GLOBAL = sandbox
<span class="hljs-keyword">else</span>
sandbox = <span class="hljs-built_in">global</span>
sandbox.__filename = options.filename || <span class="hljs-string">'eval'</span>
sandbox.__dirname = path.dirname sandbox.__filename</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>define module/require only if they chose not to specify their own</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> sandbox <span class="hljs-keyword">isnt</span> <span class="hljs-built_in">global</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">module</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">require</span>
Module = <span class="hljs-built_in">require</span> <span class="hljs-string">'module'</span>
sandbox.<span class="hljs-built_in">module</span> = _module = <span class="hljs-keyword">new</span> Module(options.modulename || <span class="hljs-string">'eval'</span>)
sandbox.<span class="hljs-built_in">require</span> = _require = <span class="hljs-function"><span class="hljs-params">(path)</span> -&gt;</span> Module._load path, _module, <span class="hljs-literal">true</span>
_module.filename = sandbox.__filename
<span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> Object.getOwnPropertyNames <span class="hljs-built_in">require</span> <span class="hljs-keyword">when</span> r <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'paths'</span>, <span class="hljs-string">'arguments'</span>, <span class="hljs-string">'caller'</span>]
_require[r] = <span class="hljs-built_in">require</span>[r]</pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>use the same hack node currently uses for their own REPL</p>
</div>
<div class="content"><div class='highlight'><pre> _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
_require.resolve = <span class="hljs-function"><span class="hljs-params">(request)</span> -&gt;</span> Module._resolveFilename request, _module
o = {}
o[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options
o.bare = <span class="hljs-literal">on</span> <span class="hljs-comment"># ensure return value</span>
js = compile code, o
<span class="hljs-keyword">if</span> sandbox <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js
<span class="hljs-keyword">else</span>
vm.runInContext js, sandbox
exports.register = <span class="hljs-function">-&gt;</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./register'</span></pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Throw error with deprecation warning when depending upon implicit <code>require.extensions</code> registration</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">require</span>.extensions
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> @FILE_EXTENSIONS <span class="hljs-keyword">then</span> <span class="hljs-keyword">do</span> (ext) -&gt;
<span class="hljs-built_in">require</span>.extensions[ext] ?= <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"""
Use CoffeeScript.register() or require the coffeescript/register module to require <span class="hljs-subst">#{ext}</span> files.
"""</span>
exports._compileFile = <span class="hljs-function"><span class="hljs-params">(filename, sourceMap = <span class="hljs-literal">no</span>, inlineMap = <span class="hljs-literal">no</span>)</span> -&gt;</span>
raw = fs.readFileSync filename, <span class="hljs-string">'utf8'</span></pre></div></div>
</li>
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Strip the Unicode byte order mark, if this file begins with one.</p>
</div>
<div class="content"><div class='highlight'><pre> stripped = <span class="hljs-keyword">if</span> raw.charCodeAt(<span class="hljs-number">0</span>) <span class="hljs-keyword">is</span> <span class="hljs-number">0xFEFF</span> <span class="hljs-keyword">then</span> raw.substring <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> raw
<span class="hljs-keyword">try</span>
answer = compile stripped, {
filename, sourceMap, inlineMap
sourceFiles: [filename]
literate: helpers.isLiterate filename
}
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>As the filename and code of a dynamically loaded file will be different
from the original file compiled with CoffeeScript.run, add that
information to error so it can be pretty-printed later.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, stripped, filename
answer</pre></div></div>
</li>
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Instantiate a Lexer for our use here.</p>
</div>
<div class="content"><div class='highlight'><pre>lexer = <span class="hljs-keyword">new</span> Lexer</pre></div></div>
</li>
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>The real Lexer produces a generic stream of tokens. This object provides a
thin wrapper around it, compatible with the Jison API. We can then pass it
directly as a “Jison lexer”.</p>
</div>
<div class="content"><div class='highlight'><pre>parser.lexer =
lex: <span class="hljs-function">-&gt;</span>
token = parser.tokens[@pos++]
<span class="hljs-keyword">if</span> token
[tag, @yytext, @yylloc] = token
parser.errorToken = token.origin <span class="hljs-keyword">or</span> token
@yylineno = @yylloc.first_line
<span class="hljs-keyword">else</span>
tag = <span class="hljs-string">''</span>
tag
setInput: <span class="hljs-function"><span class="hljs-params">(tokens)</span> -&gt;</span>
parser.tokens = tokens
@pos = <span class="hljs-number">0</span>
upcomingInput: <span class="hljs-function">-&gt;</span>
<span class="hljs-string">""</span></pre></div></div>
</li>
<li id="section-32">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-32">&#182;</a>
</div>
<p>Make all the AST nodes visible to the parser.</p>
</div>
<div class="content"><div class='highlight'><pre>parser.yy = <span class="hljs-built_in">require</span> <span class="hljs-string">'./nodes'</span></pre></div></div>
</li>
<li id="section-33">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-33">&#182;</a>
</div>
<p>Override Jisons default error handling function.</p>
</div>
<div class="content"><div class='highlight'><pre>parser.yy.parseError = <span class="hljs-function"><span class="hljs-params">(message, {token})</span> -&gt;</span></pre></div></div>
</li>
<li id="section-34">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-34">&#182;</a>
</div>
<p>Disregard Jisons message, it contains redundant line number information.
Disregard the token, we take its value directly from the lexer in case
the error is caused by a generated token which might refer to its origin.</p>
</div>
<div class="content"><div class='highlight'><pre> {errorToken, tokens} = parser
[errorTag, errorText, errorLoc] = errorToken
errorText = <span class="hljs-keyword">switch</span>
<span class="hljs-keyword">when</span> errorToken <span class="hljs-keyword">is</span> tokens[tokens.length - <span class="hljs-number">1</span>]
<span class="hljs-string">'end of input'</span>
<span class="hljs-keyword">when</span> errorTag <span class="hljs-keyword">in</span> [<span class="hljs-string">'INDENT'</span>, <span class="hljs-string">'OUTDENT'</span>]
<span class="hljs-string">'indentation'</span>
<span class="hljs-keyword">when</span> errorTag <span class="hljs-keyword">in</span> [<span class="hljs-string">'IDENTIFIER'</span>, <span class="hljs-string">'NUMBER'</span>, <span class="hljs-string">'INFINITY'</span>, <span class="hljs-string">'STRING'</span>, <span class="hljs-string">'STRING_START'</span>, <span class="hljs-string">'REGEX'</span>, <span class="hljs-string">'REGEX_START'</span>]
errorTag.replace(<span class="hljs-regexp">/_START$/</span>, <span class="hljs-string">''</span>).toLowerCase()
<span class="hljs-keyword">else</span>
helpers.nameWhitespaceCharacter errorText</pre></div></div>
</li>
<li id="section-35">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
</div>
<p>The second argument has a <code>loc</code> property, which should have the location
data for this token. Unfortunately, Jison seems to send an outdated <code>loc</code>
(from the previous token), so we take the location information directly
from the lexer.</p>
</div>
<div class="content"><div class='highlight'><pre> helpers.throwSyntaxError <span class="hljs-string">"unexpected <span class="hljs-subst">#{errorText}</span>"</span>, errorLoc</pre></div></div>
</li>
<li id="section-36">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-36">&#182;</a>
</div>
<p>Based on <a href="http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js">http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js</a>
Modified to handle sourceMap</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">formatSourcePosition</span> = <span class="hljs-params">(frame, getSourceMapping)</span> -&gt;</span>
filename = <span class="hljs-literal">undefined</span>
fileLocation = <span class="hljs-string">''</span>
<span class="hljs-keyword">if</span> frame.isNative()
fileLocation = <span class="hljs-string">"native"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-keyword">if</span> frame.isEval()
filename = frame.getScriptNameOrSourceURL()
fileLocation = <span class="hljs-string">"<span class="hljs-subst">#{frame.getEvalOrigin()}</span>, "</span> <span class="hljs-keyword">unless</span> filename
<span class="hljs-keyword">else</span>
filename = frame.getFileName()
filename <span class="hljs-keyword">or</span>= <span class="hljs-string">"&lt;anonymous&gt;"</span>
line = frame.getLineNumber()
column = frame.getColumnNumber()</pre></div></div>
</li>
<li id="section-37">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-37">&#182;</a>
</div>
<p>Check for a sourceMap position</p>
</div>
<div class="content"><div class='highlight'><pre> source = getSourceMapping filename, line, column
fileLocation =
<span class="hljs-keyword">if</span> source
<span class="hljs-string">"<span class="hljs-subst">#{filename}</span>:<span class="hljs-subst">#{source[<span class="hljs-number">0</span>]}</span>:<span class="hljs-subst">#{source[<span class="hljs-number">1</span>]}</span>"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"<span class="hljs-subst">#{filename}</span>:<span class="hljs-subst">#{line}</span>:<span class="hljs-subst">#{column}</span>"</span>
functionName = frame.getFunctionName()
isConstructor = frame.isConstructor()
isMethodCall = <span class="hljs-keyword">not</span> (frame.isToplevel() <span class="hljs-keyword">or</span> isConstructor)
<span class="hljs-keyword">if</span> isMethodCall
methodName = frame.getMethodName()
typeName = frame.getTypeName()
<span class="hljs-keyword">if</span> functionName
tp = <span class="hljs-keyword">as</span> = <span class="hljs-string">''</span>
<span class="hljs-keyword">if</span> typeName <span class="hljs-keyword">and</span> functionName.indexOf typeName
tp = <span class="hljs-string">"<span class="hljs-subst">#{typeName}</span>."</span>
<span class="hljs-keyword">if</span> methodName <span class="hljs-keyword">and</span> functionName.indexOf(<span class="hljs-string">".<span class="hljs-subst">#{methodName}</span>"</span>) <span class="hljs-keyword">isnt</span> functionName.length - methodName.length - <span class="hljs-number">1</span>
<span class="hljs-keyword">as</span> = <span class="hljs-string">" [as <span class="hljs-subst">#{methodName}</span>]"</span>
<span class="hljs-string">"<span class="hljs-subst">#{tp}</span><span class="hljs-subst">#{functionName}</span><span class="hljs-subst">#{<span class="hljs-keyword">as</span>}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"<span class="hljs-subst">#{typeName}</span>.<span class="hljs-subst">#{methodName <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> isConstructor
<span class="hljs-string">"new <span class="hljs-subst">#{functionName <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> functionName
<span class="hljs-string">"<span class="hljs-subst">#{functionName}</span> (<span class="hljs-subst">#{fileLocation}</span>)"</span>
<span class="hljs-keyword">else</span>
fileLocation
<span class="hljs-function">
<span class="hljs-title">getSourceMap</span> = <span class="hljs-params">(filename)</span> -&gt;</span>
<span class="hljs-keyword">if</span> sourceMaps[filename]?
sourceMaps[filename]</pre></div></div>
</li>
<li id="section-38">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-38">&#182;</a>
</div>
<p>CoffeeScript compiled in a browser may get compiled with <code>options.filename</code>
of <code>&lt;anonymous&gt;</code>, but the browser may request the stack trace with the
filename of the script file.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]?
sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sources[filename]?
answer = compile sources[filename],
filename: filename
sourceMap: <span class="hljs-literal">yes</span>
literate: helpers.isLiterate filename
answer.sourceMap
<span class="hljs-keyword">else</span>
<span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-39">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
</div>
<p>Based on <a href="http://goo.gl/ZTx1p">michaelficarra/CoffeeScriptRedux</a>
NodeJS / V8 have no support for transforming positions in stack traces using
sourceMap, so we must monkey-patch Error to display CoffeeScript source
positions.</p>
</div>
<div class="content"><div class='highlight'><pre>Error.prepareStackTrace = <span class="hljs-function"><span class="hljs-params">(err, stack)</span> -&gt;</span>
<span class="hljs-function"> <span class="hljs-title">getSourceMapping</span> = <span class="hljs-params">(filename, line, column)</span> -&gt;</span>
sourceMap = getSourceMap filename
answer = sourceMap.sourceLocation [line - <span class="hljs-number">1</span>, column - <span class="hljs-number">1</span>] <span class="hljs-keyword">if</span> sourceMap?
<span class="hljs-keyword">if</span> answer? <span class="hljs-keyword">then</span> [answer[<span class="hljs-number">0</span>] + <span class="hljs-number">1</span>, answer[<span class="hljs-number">1</span>] + <span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> <span class="hljs-literal">null</span>
frames = <span class="hljs-keyword">for</span> frame <span class="hljs-keyword">in</span> stack
<span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> frame.getFunction() <span class="hljs-keyword">is</span> exports.run
<span class="hljs-string">" at <span class="hljs-subst">#{formatSourcePosition frame, getSourceMapping}</span>"</span>
<span class="hljs-string">"<span class="hljs-subst">#{err.toString()}</span>\n<span class="hljs-subst">#{frames.join <span class="hljs-string">'\n'</span>}</span>\n"</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,882 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>command.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>command.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>The <code>coffee</code> utility. Handles command-line compilation of CoffeeScript
into various forms: saved into <code>.js</code> files or printed to stdout
or recompiled every time the source is saved,
printed as a token stream or as the syntax tree, or launch an
interactive REPL.</p>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>External dependencies.</p>
</div>
<div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
{spawn, exec} = <span class="hljs-built_in">require</span> <span class="hljs-string">'child_process'</span>
{EventEmitter} = <span class="hljs-built_in">require</span> <span class="hljs-string">'events'</span>
useWinPathSep = path.sep <span class="hljs-keyword">is</span> <span class="hljs-string">'\\'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Allow CoffeeScript to emit Node.js events.</p>
</div>
<div class="content"><div class='highlight'><pre>helpers.extend CoffeeScript, <span class="hljs-keyword">new</span> EventEmitter
<span class="hljs-function">
<span class="hljs-title">printLine</span> = <span class="hljs-params">(line)</span> -&gt;</span> process.stdout.write line + <span class="hljs-string">'\n'</span>
<span class="hljs-function"><span class="hljs-title">printWarn</span> = <span class="hljs-params">(line)</span> -&gt;</span> process.stderr.write line + <span class="hljs-string">'\n'</span>
<span class="hljs-function">
<span class="hljs-title">hidden</span> = <span class="hljs-params">(file)</span> -&gt;</span> <span class="hljs-regexp">/^\.|~$/</span>.test file</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>The help banner that is printed in conjunction with <code>-h</code>/<code>--help</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>BANNER = <span class="hljs-string">'''
Usage: coffee [options] path/to/script.coffee -- [args]
If called without options, `coffee` will run your script.
'''</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>The list of all the valid option flags that <code>coffee</code> knows how to handle.</p>
</div>
<div class="content"><div class='highlight'><pre>SWITCHES = [
[<span class="hljs-string">'-b'</span>, <span class="hljs-string">'--bare'</span>, <span class="hljs-string">'compile without a top-level function wrapper'</span>]
[<span class="hljs-string">'-c'</span>, <span class="hljs-string">'--compile'</span>, <span class="hljs-string">'compile to JavaScript and save as .js files'</span>]
[<span class="hljs-string">'-e'</span>, <span class="hljs-string">'--eval'</span>, <span class="hljs-string">'pass a string from the command line as input'</span>]
[<span class="hljs-string">'-h'</span>, <span class="hljs-string">'--help'</span>, <span class="hljs-string">'display this help message'</span>]
[<span class="hljs-string">'-i'</span>, <span class="hljs-string">'--interactive'</span>, <span class="hljs-string">'run an interactive CoffeeScript REPL'</span>]
[<span class="hljs-string">'-j'</span>, <span class="hljs-string">'--join [FILE]'</span>, <span class="hljs-string">'concatenate the source CoffeeScript before compiling'</span>]
[<span class="hljs-string">'-m'</span>, <span class="hljs-string">'--map'</span>, <span class="hljs-string">'generate source map and save as .js.map files'</span>]
[<span class="hljs-string">'-M'</span>, <span class="hljs-string">'--inline-map'</span>, <span class="hljs-string">'generate source map and include it directly in output'</span>]
[<span class="hljs-string">'-n'</span>, <span class="hljs-string">'--nodes'</span>, <span class="hljs-string">'print out the parse tree that the parser produces'</span>]
[ <span class="hljs-string">'--nodejs [ARGS]'</span>, <span class="hljs-string">'pass options directly to the "node" binary'</span>]
[ <span class="hljs-string">'--no-header'</span>, <span class="hljs-string">'suppress the "Generated by" header'</span>]
[<span class="hljs-string">'-o'</span>, <span class="hljs-string">'--output [DIR]'</span>, <span class="hljs-string">'set the output directory for compiled JavaScript'</span>]
[<span class="hljs-string">'-p'</span>, <span class="hljs-string">'--print'</span>, <span class="hljs-string">'print out the compiled JavaScript'</span>]
[<span class="hljs-string">'-r'</span>, <span class="hljs-string">'--require [MODULE*]'</span>, <span class="hljs-string">'require the given module before eval or REPL'</span>]
[<span class="hljs-string">'-s'</span>, <span class="hljs-string">'--stdio'</span>, <span class="hljs-string">'listen for and compile scripts over stdio'</span>]
[<span class="hljs-string">'-l'</span>, <span class="hljs-string">'--literate'</span>, <span class="hljs-string">'treat stdio as literate style coffeescript'</span>]
[<span class="hljs-string">'-t'</span>, <span class="hljs-string">'--tokens'</span>, <span class="hljs-string">'print out the tokens that the lexer/rewriter produce'</span>]
[<span class="hljs-string">'-v'</span>, <span class="hljs-string">'--version'</span>, <span class="hljs-string">'display the version number'</span>]
[<span class="hljs-string">'-w'</span>, <span class="hljs-string">'--watch'</span>, <span class="hljs-string">'watch scripts for changes and rerun commands'</span>]
]</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Top-level objects shared by all the functions.</p>
</div>
<div class="content"><div class='highlight'><pre>opts = {}
sources = []
sourceCode = []
notSources = {}
watchedDirs = {}
optionParser = <span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Run <code>coffee</code> by parsing passed options and determining what action to take.
Many flags cause us to divert before compiling anything. Flags passed after
<code>--</code> will be passed verbatim to your script as arguments in <code>process.argv</code></p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function">-&gt;</span>
parseOptions()</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Make the REPL <em>CLI</em> use the global context so as to (a) be consistent with the
<code>node</code> REPL CLI and, therefore, (b) make packages that modify native prototypes
(such as colors and sugar) work as expected.</p>
</div>
<div class="content"><div class='highlight'><pre> replCliOpts = useGlobal: <span class="hljs-literal">yes</span>
opts.prelude = makePrelude opts.<span class="hljs-built_in">require</span> <span class="hljs-keyword">if</span> opts.<span class="hljs-built_in">require</span>
replCliOpts.prelude = opts.prelude
<span class="hljs-keyword">return</span> forkNode() <span class="hljs-keyword">if</span> opts.nodejs
<span class="hljs-keyword">return</span> usage() <span class="hljs-keyword">if</span> opts.help
<span class="hljs-keyword">return</span> version() <span class="hljs-keyword">if</span> opts.version
<span class="hljs-keyword">return</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">'./repl'</span>).start(replCliOpts) <span class="hljs-keyword">if</span> opts.interactive
<span class="hljs-keyword">return</span> compileStdio() <span class="hljs-keyword">if</span> opts.stdio
<span class="hljs-keyword">return</span> compileScript <span class="hljs-literal">null</span>, opts.arguments[<span class="hljs-number">0</span>] <span class="hljs-keyword">if</span> opts.eval
<span class="hljs-keyword">return</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">'./repl'</span>).start(replCliOpts) <span class="hljs-keyword">unless</span> opts.arguments.length
literals = <span class="hljs-keyword">if</span> opts.run <span class="hljs-keyword">then</span> opts.arguments.splice <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> []
process.argv = process.argv[<span class="hljs-number">0.</span><span class="hljs-number">.1</span>].concat literals
process.argv[<span class="hljs-number">0</span>] = <span class="hljs-string">'coffee'</span>
opts.output = path.resolve opts.output <span class="hljs-keyword">if</span> opts.output
<span class="hljs-keyword">if</span> opts.join
opts.join = path.resolve opts.join
<span class="hljs-built_in">console</span>.error <span class="hljs-string">'''
The --join option is deprecated and will be removed in a future version.
If for some reason it's necessary to share local variables between files,
replace...
$ coffee --compile --join bundle.js -- a.coffee b.coffee c.coffee
with...
$ cat a.coffee b.coffee c.coffee | coffee --compile --stdio &gt; bundle.js
'''</span>
<span class="hljs-keyword">for</span> source <span class="hljs-keyword">in</span> opts.arguments
source = path.resolve source
compilePath source, <span class="hljs-literal">yes</span>, source
<span class="hljs-function">
<span class="hljs-title">makePrelude</span> = <span class="hljs-params">(requires)</span> -&gt;</span>
requires.map (<span class="hljs-built_in">module</span>) -&gt;
[_, name, <span class="hljs-built_in">module</span>] = match <span class="hljs-keyword">if</span> match = <span class="hljs-built_in">module</span>.match(<span class="hljs-regexp">/^(.*)=(.*)$/</span>)
name ||= helpers.baseFileName <span class="hljs-built_in">module</span>, <span class="hljs-literal">yes</span>, useWinPathSep
<span class="hljs-string">"<span class="hljs-subst">#{name}</span> = require('<span class="hljs-subst">#{<span class="hljs-built_in">module</span>}</span>')"</span>
.join <span class="hljs-string">';'</span></pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Compile a path, which could be a script or a directory. If a directory
is passed, recursively compile all .coffee, .litcoffee, and .coffee.md
extension source files in it and all subdirectories.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compilePath</span> = <span class="hljs-params">(source, topLevel, base)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> source <span class="hljs-keyword">in</span> sources <span class="hljs-keyword">or</span>
watchedDirs[source] <span class="hljs-keyword">or</span>
<span class="hljs-keyword">not</span> topLevel <span class="hljs-keyword">and</span> (notSources[source] <span class="hljs-keyword">or</span> hidden source)
<span class="hljs-keyword">try</span>
stats = fs.statSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"File not found: <span class="hljs-subst">#{source}</span>"</span>
process.exit <span class="hljs-number">1</span>
<span class="hljs-keyword">throw</span> err
<span class="hljs-keyword">if</span> stats.isDirectory()
<span class="hljs-keyword">if</span> path.basename(source) <span class="hljs-keyword">is</span> <span class="hljs-string">'node_modules'</span>
notSources[source] = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">return</span>
<span class="hljs-keyword">if</span> opts.run
compilePath findDirectoryIndex(source), topLevel, base
<span class="hljs-keyword">return</span>
watchDir source, base <span class="hljs-keyword">if</span> opts.watch
<span class="hljs-keyword">try</span>
files = fs.readdirSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">return</span> <span class="hljs-keyword">else</span> <span class="hljs-keyword">throw</span> err
<span class="hljs-keyword">for</span> file <span class="hljs-keyword">in</span> files
compilePath (path.join source, file), <span class="hljs-literal">no</span>, base
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> topLevel <span class="hljs-keyword">or</span> helpers.isCoffee source
sources.push source
sourceCode.push <span class="hljs-literal">null</span>
<span class="hljs-keyword">delete</span> notSources[source]
watch source, base <span class="hljs-keyword">if</span> opts.watch
<span class="hljs-keyword">try</span>
code = fs.readFileSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">return</span> <span class="hljs-keyword">else</span> <span class="hljs-keyword">throw</span> err
compileScript(source, code.toString(), base)
<span class="hljs-keyword">else</span>
notSources[source] = <span class="hljs-literal">yes</span>
<span class="hljs-function">
<span class="hljs-title">findDirectoryIndex</span> = <span class="hljs-params">(source)</span> -&gt;</span>
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> CoffeeScript.FILE_EXTENSIONS
index = path.join source, <span class="hljs-string">"index<span class="hljs-subst">#{ext}</span>"</span>
<span class="hljs-keyword">try</span>
<span class="hljs-keyword">return</span> index <span class="hljs-keyword">if</span> (fs.statSync index).isFile()
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"Missing index.coffee or index.litcoffee in <span class="hljs-subst">#{source}</span>"</span>
process.exit <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Compile a single source script, containing the given code, according to the
requested options. If evaluating the script directly sets <code>__filename</code>,
<code>__dirname</code> and <code>module.filename</code> to be correct relative to the scripts path.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileScript</span> = <span class="hljs-params">(file, input, base = <span class="hljs-literal">null</span>)</span> -&gt;</span>
o = opts
options = compileOptions file, base
<span class="hljs-keyword">try</span>
t = task = {file, input, options}
CoffeeScript.emit <span class="hljs-string">'compile'</span>, task
<span class="hljs-keyword">if</span> o.tokens
printTokens CoffeeScript.tokens t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.nodes
printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.run
CoffeeScript.register()
CoffeeScript.eval opts.prelude, t.options <span class="hljs-keyword">if</span> opts.prelude
CoffeeScript.run t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.join <span class="hljs-keyword">and</span> t.file <span class="hljs-keyword">isnt</span> o.join
t.input = helpers.invertLiterate t.input <span class="hljs-keyword">if</span> helpers.isLiterate file
sourceCode[sources.indexOf(t.file)] = t.input
compileJoin()
<span class="hljs-keyword">else</span>
compiled = CoffeeScript.compile t.input, t.options
t.output = compiled
<span class="hljs-keyword">if</span> o.map
t.output = compiled.js
t.sourceMap = compiled.v3SourceMap
CoffeeScript.emit <span class="hljs-string">'success'</span>, task
<span class="hljs-keyword">if</span> o.<span class="hljs-built_in">print</span>
printLine t.output.trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.compile <span class="hljs-keyword">or</span> o.map
writeJs base, t.file, t.output, options.jsPath, t.sourceMap
<span class="hljs-keyword">catch</span> err
CoffeeScript.emit <span class="hljs-string">'failure'</span>, err, task
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> CoffeeScript.listeners(<span class="hljs-string">'failure'</span>).length
message = err?.stack <span class="hljs-keyword">or</span> <span class="hljs-string">"<span class="hljs-subst">#{err}</span>"</span>
<span class="hljs-keyword">if</span> o.watch
printLine message + <span class="hljs-string">'\x07'</span>
<span class="hljs-keyword">else</span>
printWarn message
process.exit <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Attach the appropriate listeners to compile scripts incoming over <strong>stdin</strong>,
and write them back to <strong>stdout</strong>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileStdio</span> = -&gt;</span>
buffers = []
stdin = process.openStdin()
stdin.<span class="hljs-literal">on</span> <span class="hljs-string">'data'</span>, <span class="hljs-function"><span class="hljs-params">(buffer)</span> -&gt;</span>
buffers.push buffer <span class="hljs-keyword">if</span> buffer
stdin.<span class="hljs-literal">on</span> <span class="hljs-string">'end'</span>, <span class="hljs-function">-&gt;</span>
compileScript <span class="hljs-literal">null</span>, Buffer.concat(buffers).toString()</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>If all of the source files are done being read, concatenate and compile
them together.</p>
</div>
<div class="content"><div class='highlight'><pre>joinTimeout = <span class="hljs-literal">null</span>
<span class="hljs-function"><span class="hljs-title">compileJoin</span> = -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> opts.join
<span class="hljs-keyword">unless</span> sourceCode.some(<span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span> code <span class="hljs-keyword">is</span> <span class="hljs-literal">null</span>)
clearTimeout joinTimeout
joinTimeout = wait <span class="hljs-number">100</span>, <span class="hljs-function">-&gt;</span>
compileScript opts.join, sourceCode.join(<span class="hljs-string">'\n'</span>), opts.join</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Watch a source CoffeeScript file using <code>fs.watch</code>, recompiling it every
time the file is updated. May be used in combination with other options,
such as <code>--print</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">watch</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
watcher = <span class="hljs-literal">null</span>
prevStats = <span class="hljs-literal">null</span>
compileTimeout = <span class="hljs-literal">null</span>
<span class="hljs-function">
<span class="hljs-title">watchErr</span> = <span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> source <span class="hljs-keyword">in</span> sources
<span class="hljs-keyword">try</span>
rewatch()
compile()
<span class="hljs-keyword">catch</span>
removeSource source, base
compileJoin()
<span class="hljs-function">
<span class="hljs-title">compile</span> = -&gt;</span>
clearTimeout compileTimeout
compileTimeout = wait <span class="hljs-number">25</span>, <span class="hljs-function">-&gt;</span>
fs.stat source, <span class="hljs-function"><span class="hljs-params">(err, stats)</span> -&gt;</span>
<span class="hljs-keyword">return</span> watchErr err <span class="hljs-keyword">if</span> err
<span class="hljs-keyword">return</span> rewatch() <span class="hljs-keyword">if</span> prevStats <span class="hljs-keyword">and</span>
stats.size <span class="hljs-keyword">is</span> prevStats.size <span class="hljs-keyword">and</span>
stats.mtime.getTime() <span class="hljs-keyword">is</span> prevStats.mtime.getTime()
prevStats = stats
fs.readFile source, <span class="hljs-function"><span class="hljs-params">(err, code)</span> -&gt;</span>
<span class="hljs-keyword">return</span> watchErr err <span class="hljs-keyword">if</span> err
compileScript(source, code.toString(), base)
rewatch()
<span class="hljs-function">
<span class="hljs-title">startWatcher</span> = -&gt;</span>
watcher = fs.watch source
.<span class="hljs-literal">on</span> <span class="hljs-string">'change'</span>, compile
.<span class="hljs-literal">on</span> <span class="hljs-string">'error'</span>, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'EPERM'</span>
removeSource source, base
<span class="hljs-function">
<span class="hljs-title">rewatch</span> = -&gt;</span>
watcher?.close()
startWatcher()
<span class="hljs-keyword">try</span>
startWatcher()
<span class="hljs-keyword">catch</span> err
watchErr err</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Watch a directory of files for new additions.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">watchDir</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
watcher = <span class="hljs-literal">null</span>
readdirTimeout = <span class="hljs-literal">null</span>
<span class="hljs-function">
<span class="hljs-title">startWatcher</span> = -&gt;</span>
watcher = fs.watch source
.<span class="hljs-literal">on</span> <span class="hljs-string">'error'</span>, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'EPERM'</span>
stopWatcher()
.<span class="hljs-literal">on</span> <span class="hljs-string">'change'</span>, <span class="hljs-function">-&gt;</span>
clearTimeout readdirTimeout
readdirTimeout = wait <span class="hljs-number">25</span>, <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">try</span>
files = fs.readdirSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-keyword">return</span> stopWatcher()
<span class="hljs-keyword">for</span> file <span class="hljs-keyword">in</span> files
compilePath (path.join source, file), <span class="hljs-literal">no</span>, base
<span class="hljs-function">
<span class="hljs-title">stopWatcher</span> = -&gt;</span>
watcher.close()
removeSourceDir source, base
watchedDirs[source] = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">try</span>
startWatcher()
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span>
<span class="hljs-function">
<span class="hljs-title">removeSourceDir</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
<span class="hljs-keyword">delete</span> watchedDirs[source]
sourcesChanged = <span class="hljs-literal">no</span>
<span class="hljs-keyword">for</span> file <span class="hljs-keyword">in</span> sources <span class="hljs-keyword">when</span> source <span class="hljs-keyword">is</span> path.dirname file
removeSource file, base
sourcesChanged = <span class="hljs-literal">yes</span>
compileJoin() <span class="hljs-keyword">if</span> sourcesChanged</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Remove a file from our source list, and source code cache. Optionally remove
the compiled JS version as well.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">removeSource</span> = <span class="hljs-params">(source, base)</span> -&gt;</span>
index = sources.indexOf source
sources.splice index, <span class="hljs-number">1</span>
sourceCode.splice index, <span class="hljs-number">1</span>
<span class="hljs-keyword">unless</span> opts.join
silentUnlink outputPath source, base
silentUnlink outputPath source, base, <span class="hljs-string">'.js.map'</span>
timeLog <span class="hljs-string">"removed <span class="hljs-subst">#{source}</span>"</span>
<span class="hljs-function">
<span class="hljs-title">silentUnlink</span> = <span class="hljs-params">(path)</span> -&gt;</span>
<span class="hljs-keyword">try</span>
fs.unlinkSync path
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">throw</span> err <span class="hljs-keyword">unless</span> err.code <span class="hljs-keyword">in</span> [<span class="hljs-string">'ENOENT'</span>, <span class="hljs-string">'EPERM'</span>]</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Get the corresponding output JavaScript path for a source file.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">outputPath</span> = <span class="hljs-params">(source, base, extension=<span class="hljs-string">".js"</span>)</span> -&gt;</span>
basename = helpers.baseFileName source, <span class="hljs-literal">yes</span>, useWinPathSep
srcDir = path.dirname source
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> opts.output
dir = srcDir
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> source <span class="hljs-keyword">is</span> base
dir = opts.output
<span class="hljs-keyword">else</span>
dir = path.join opts.output, path.relative base, srcDir
path.join dir, basename + extension</pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Recursively mkdir, like <code>mkdir -p</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">mkdirp</span> = <span class="hljs-params">(dir, fn)</span> -&gt;</span>
mode = <span class="hljs-number">0</span>o777 &amp; ~process.umask()
<span class="hljs-keyword">do</span> mkdirs = <span class="hljs-function"><span class="hljs-params">(p = dir, fn)</span> -&gt;</span>
fs.exists p, <span class="hljs-function"><span class="hljs-params">(exists)</span> -&gt;</span>
<span class="hljs-keyword">if</span> exists
fn()
<span class="hljs-keyword">else</span>
mkdirs path.dirname(p), <span class="hljs-function">-&gt;</span>
fs.mkdir p, mode, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">return</span> fn err <span class="hljs-keyword">if</span> err
fn()</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Write out a JavaScript source file with the compiled code. By default, files
are written out in <code>cwd</code> as <code>.js</code> files with the same name, but the output
directory can be customized with <code>--output</code>.</p>
<p>If <code>generatedSourceMap</code> is provided, this will write a <code>.js.map</code> file into the
same directory as the <code>.js</code> file.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">writeJs</span> = <span class="hljs-params">(base, sourcePath, js, jsPath, generatedSourceMap = <span class="hljs-literal">null</span>)</span> -&gt;</span>
sourceMapPath = outputPath sourcePath, base, <span class="hljs-string">".js.map"</span>
jsDir = path.dirname jsPath
<span class="hljs-function"> <span class="hljs-title">compile</span> = -&gt;</span>
<span class="hljs-keyword">if</span> opts.compile
js = <span class="hljs-string">' '</span> <span class="hljs-keyword">if</span> js.length &lt;= <span class="hljs-number">0</span>
<span class="hljs-keyword">if</span> generatedSourceMap <span class="hljs-keyword">then</span> js = <span class="hljs-string">"<span class="hljs-subst">#{js}</span>\n//# sourceMappingURL=<span class="hljs-subst">#{helpers.baseFileName sourceMapPath, <span class="hljs-literal">no</span>, useWinPathSep}</span>\n"</span>
fs.writeFile jsPath, js, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">if</span> err
printLine err.message
process.exit <span class="hljs-number">1</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> opts.compile <span class="hljs-keyword">and</span> opts.watch
timeLog <span class="hljs-string">"compiled <span class="hljs-subst">#{sourcePath}</span>"</span>
<span class="hljs-keyword">if</span> generatedSourceMap
fs.writeFile sourceMapPath, generatedSourceMap, <span class="hljs-function"><span class="hljs-params">(err)</span> -&gt;</span>
<span class="hljs-keyword">if</span> err
printLine <span class="hljs-string">"Could not write source map: <span class="hljs-subst">#{err.message}</span>"</span>
process.exit <span class="hljs-number">1</span>
fs.exists jsDir, <span class="hljs-function"><span class="hljs-params">(itExists)</span> -&gt;</span>
<span class="hljs-keyword">if</span> itExists <span class="hljs-keyword">then</span> compile() <span class="hljs-keyword">else</span> mkdirp jsDir, compile</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Convenience for cleaner setTimeouts.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">wait</span> = <span class="hljs-params">(milliseconds, func)</span> -&gt;</span> setTimeout func, milliseconds</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>When watching scripts, its useful to log changes with the timestamp.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">timeLog</span> = <span class="hljs-params">(message)</span> -&gt;</span>
<span class="hljs-built_in">console</span>.log <span class="hljs-string">"<span class="hljs-subst">#{(<span class="hljs-keyword">new</span> Date).toLocaleTimeString()}</span> - <span class="hljs-subst">#{message}</span>"</span></pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Pretty-print a stream of tokens, sans location data.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">printTokens</span> = <span class="hljs-params">(tokens)</span> -&gt;</span>
strings = <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens
tag = token[<span class="hljs-number">0</span>]
value = token[<span class="hljs-number">1</span>].toString().replace(<span class="hljs-regexp">/\n/</span>, <span class="hljs-string">'\\n'</span>)
<span class="hljs-string">"[<span class="hljs-subst">#{tag}</span> <span class="hljs-subst">#{value}</span>]"</span>
printLine strings.join(<span class="hljs-string">' '</span>)</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Use the <a href="optparse.html">OptionParser module</a> to extract all options from
<code>process.argv</code> that are specified in <code>SWITCHES</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">parseOptions</span> = -&gt;</span>
optionParser = <span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER
o = opts = optionParser.parse process.argv[<span class="hljs-number">2.</span>.]
o.compile <span class="hljs-keyword">or</span>= !!o.output
o.run = <span class="hljs-keyword">not</span> (o.compile <span class="hljs-keyword">or</span> o.<span class="hljs-built_in">print</span> <span class="hljs-keyword">or</span> o.map)
o.<span class="hljs-built_in">print</span> = !! (o.<span class="hljs-built_in">print</span> <span class="hljs-keyword">or</span> (o.eval <span class="hljs-keyword">or</span> o.stdio <span class="hljs-keyword">and</span> o.compile))</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>The compile-time options to pass to the CoffeeScript compiler.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileOptions</span> = <span class="hljs-params">(filename, base)</span> -&gt;</span>
answer = {
filename
literate: opts.literate <span class="hljs-keyword">or</span> helpers.isLiterate(filename)
bare: opts.bare
header: opts.compile <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> opts[<span class="hljs-string">'no-header'</span>]
sourceMap: opts.map
inlineMap: opts[<span class="hljs-string">'inline-map'</span>]
}
<span class="hljs-keyword">if</span> filename
<span class="hljs-keyword">if</span> base
cwd = process.cwd()
jsPath = outputPath filename, base
jsDir = path.dirname jsPath
answer = helpers.merge answer, {
jsPath
sourceRoot: path.relative jsDir, cwd
sourceFiles: [path.relative cwd, filename]
generatedFile: helpers.baseFileName(jsPath, <span class="hljs-literal">no</span>, useWinPathSep)
}
<span class="hljs-keyword">else</span>
answer = helpers.merge answer,
sourceRoot: <span class="hljs-string">""</span>
sourceFiles: [helpers.baseFileName filename, <span class="hljs-literal">no</span>, useWinPathSep]
generatedFile: helpers.baseFileName(filename, <span class="hljs-literal">yes</span>, useWinPathSep) + <span class="hljs-string">".js"</span>
answer</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Start up a new Node.js instance with the arguments in <code>--nodejs</code> passed to
the <code>node</code> binary, preserving the other options.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">forkNode</span> = -&gt;</span>
nodeArgs = opts.nodejs.split <span class="hljs-regexp">/\s+/</span>
args = process.argv[<span class="hljs-number">1.</span>.]
args.splice args.indexOf(<span class="hljs-string">'--nodejs'</span>), <span class="hljs-number">2</span>
p = spawn process.execPath, nodeArgs.concat(args),
cwd: process.cwd()
env: process.env
stdio: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
p.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span> process.exit code</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Print the <code>--help</code> usage message and exit. Deprecated switches are not
shown.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">usage</span> = -&gt;</span>
printLine (<span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER).help()</pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Print the <code>--version</code> message and exit.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">version</span> = -&gt;</span>
printLine <span class="hljs-string">"CoffeeScript version <span class="hljs-subst">#{CoffeeScript.VERSION}</span>"</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,518 +0,0 @@
/*--------------------- Typography ----------------------------*/
@font-face {
font-family: 'aller-light';
src: url('public/fonts/aller-light.eot');
src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'),
url('public/fonts/aller-light.woff') format('woff'),
url('public/fonts/aller-light.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'aller-bold';
src: url('public/fonts/aller-bold.eot');
src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'),
url('public/fonts/aller-bold.woff') format('woff'),
url('public/fonts/aller-bold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'roboto-black';
src: url('public/fonts/roboto-black.eot');
src: url('public/fonts/roboto-black.eot?#iefix') format('embedded-opentype'),
url('public/fonts/roboto-black.woff') format('woff'),
url('public/fonts/roboto-black.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/*--------------------- Layout ----------------------------*/
html { height: 100%; }
body {
font-family: "aller-light";
font-size: 14px;
line-height: 18px;
color: #30404f;
margin: 0; padding: 0;
height:100%;
}
#container { min-height: 100%; }
a {
color: #000;
}
b, strong {
font-weight: normal;
font-family: "aller-bold";
}
p {
margin: 15px 0 0px;
}
.annotation ul, .annotation ol {
margin: 25px 0;
}
.annotation ul li, .annotation ol li {
font-size: 14px;
line-height: 18px;
margin: 10px 0;
}
h1, h2, h3, h4, h5, h6 {
color: #112233;
line-height: 1em;
font-weight: normal;
font-family: "roboto-black";
text-transform: uppercase;
margin: 30px 0 15px 0;
}
h1 {
margin-top: 40px;
}
h2 {
font-size: 1.26em;
}
hr {
border: 0;
background: 1px #ddd;
height: 1px;
margin: 20px 0;
}
pre, tt, code {
font-size: 12px; line-height: 16px;
font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
margin: 0; padding: 0;
}
.annotation pre {
display: block;
margin: 0;
padding: 7px 10px;
background: #fcfcfc;
-moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
overflow-x: auto;
}
.annotation pre code {
border: 0;
padding: 0;
background: transparent;
}
blockquote {
border-left: 5px solid #ccc;
margin: 0;
padding: 1px 0 1px 1em;
}
.sections blockquote p {
font-family: Menlo, Consolas, Monaco, monospace;
font-size: 12px; line-height: 16px;
color: #999;
margin: 10px 0 0;
white-space: pre-wrap;
}
ul.sections {
list-style: none;
padding:0 0 5px 0;;
margin:0;
}
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
ul.sections > li > div {
-moz-box-sizing: border-box; /* firefox */
-ms-box-sizing: border-box; /* ie */
-webkit-box-sizing: border-box; /* webkit */
-khtml-box-sizing: border-box; /* konqueror */
box-sizing: border-box; /* css3 */
}
/*---------------------- Jump Page -----------------------------*/
#jump_to, #jump_page {
margin: 0;
background: white;
-webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
-webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
font: 16px Arial;
cursor: pointer;
text-align: right;
list-style: none;
}
#jump_to a {
text-decoration: none;
}
#jump_to a.large {
display: none;
}
#jump_to a.small {
font-size: 22px;
font-weight: bold;
color: #676767;
}
#jump_to, #jump_wrapper {
position: fixed;
right: 0; top: 0;
padding: 10px 15px;
margin:0;
}
#jump_wrapper {
display: none;
padding:0;
}
#jump_to:hover #jump_wrapper {
display: block;
}
#jump_page_wrapper{
position: fixed;
right: 0;
top: 0;
bottom: 0;
}
#jump_page {
padding: 5px 0 3px;
margin: 0 0 25px 25px;
max-height: 100%;
overflow: auto;
}
#jump_page .source {
display: block;
padding: 15px;
text-decoration: none;
border-top: 1px solid #eee;
}
#jump_page .source:hover {
background: #f5f5ff;
}
#jump_page .source:first-child {
}
/*---------------------- Low resolutions (> 320px) ---------------------*/
@media only screen and (min-width: 320px) {
.pilwrap { display: none; }
ul.sections > li > div {
display: block;
padding:5px 10px 0 10px;
}
ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
padding-left: 30px;
}
ul.sections > li > div.content {
overflow-x:auto;
-webkit-box-shadow: inset 0 0 5px #e5e5ee;
box-shadow: inset 0 0 5px #e5e5ee;
border: 1px solid #dedede;
margin:5px 10px 5px 10px;
padding-bottom: 5px;
}
ul.sections > li > div.annotation pre {
margin: 7px 0 7px;
padding-left: 15px;
}
ul.sections > li > div.annotation p tt, .annotation code {
background: #f8f8ff;
border: 1px solid #dedede;
font-size: 12px;
padding: 0 0.2em;
}
}
/*---------------------- (> 481px) ---------------------*/
@media only screen and (min-width: 481px) {
#container {
position: relative;
}
body {
background-color: #F5F5FF;
font-size: 15px;
line-height: 21px;
}
pre, tt, code {
line-height: 18px;
}
p, ul, ol {
margin: 0 0 15px;
}
#jump_to {
padding: 5px 10px;
}
#jump_wrapper {
padding: 0;
}
#jump_to, #jump_page {
font: 10px Arial;
text-transform: uppercase;
}
#jump_page .source {
padding: 5px 10px;
}
#jump_to a.large {
display: inline-block;
}
#jump_to a.small {
display: none;
}
#background {
position: absolute;
top: 0; bottom: 0;
width: 350px;
background: #fff;
border-right: 1px solid #e5e5ee;
z-index: -1;
}
ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
padding-left: 40px;
}
ul.sections > li {
white-space: nowrap;
}
ul.sections > li > div {
display: inline-block;
}
ul.sections > li > div.annotation {
max-width: 350px;
min-width: 350px;
min-height: 5px;
padding: 13px;
overflow-x: hidden;
white-space: normal;
vertical-align: top;
text-align: left;
}
ul.sections > li > div.annotation pre {
margin: 15px 0 15px;
padding-left: 15px;
}
ul.sections > li > div.content {
padding: 13px;
vertical-align: top;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.pilwrap {
position: relative;
display: inline;
}
.pilcrow {
font: 12px Arial;
text-decoration: none;
color: #454545;
position: absolute;
top: 3px; left: -20px;
padding: 1px 2px;
opacity: 0;
-webkit-transition: opacity 0.2s linear;
}
.for-h1 .pilcrow {
top: 47px;
}
.for-h2 .pilcrow, .for-h3 .pilcrow, .for-h4 .pilcrow {
top: 35px;
}
ul.sections > li > div.annotation:hover .pilcrow {
opacity: 1;
}
}
/*---------------------- (> 1025px) ---------------------*/
@media only screen and (min-width: 1025px) {
body {
font-size: 16px;
line-height: 24px;
}
#background {
width: 525px;
}
ul.sections > li > div.annotation {
max-width: 525px;
min-width: 525px;
padding: 10px 25px 1px 50px;
}
ul.sections > li > div.content {
padding: 9px 15px 16px 25px;
}
}
/*---------------------- Syntax Highlighting -----------------------------*/
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
pre code {
display: block; padding: 0.5em;
color: #000;
background: #f8f8ff
}
pre .hljs-comment,
pre .hljs-template_comment,
pre .hljs-diff .hljs-header,
pre .hljs-javadoc {
color: #408080;
font-style: italic
}
pre .hljs-keyword,
pre .hljs-assignment,
pre .hljs-literal,
pre .hljs-css .hljs-rule .hljs-keyword,
pre .hljs-winutils,
pre .hljs-javascript .hljs-title,
pre .hljs-lisp .hljs-title,
pre .hljs-subst {
color: #954121;
/*font-weight: bold*/
}
pre .hljs-number,
pre .hljs-hexcolor {
color: #40a070
}
pre .hljs-string,
pre .hljs-tag .hljs-value,
pre .hljs-phpdoc,
pre .hljs-tex .hljs-formula {
color: #219161;
}
pre .hljs-title,
pre .hljs-id {
color: #19469D;
}
pre .hljs-params {
color: #00F;
}
pre .hljs-javascript .hljs-title,
pre .hljs-lisp .hljs-title,
pre .hljs-subst {
font-weight: normal
}
pre .hljs-class .hljs-title,
pre .hljs-haskell .hljs-label,
pre .hljs-tex .hljs-command {
color: #458;
font-weight: bold
}
pre .hljs-tag,
pre .hljs-tag .hljs-title,
pre .hljs-rules .hljs-property,
pre .hljs-django .hljs-tag .hljs-keyword {
color: #000080;
font-weight: normal
}
pre .hljs-attribute,
pre .hljs-variable,
pre .hljs-instancevar,
pre .hljs-lisp .hljs-body {
color: #008080
}
pre .hljs-regexp {
color: #B68
}
pre .hljs-class {
color: #458;
font-weight: bold
}
pre .hljs-symbol,
pre .hljs-ruby .hljs-symbol .hljs-string,
pre .hljs-ruby .hljs-symbol .hljs-keyword,
pre .hljs-ruby .hljs-symbol .hljs-keymethods,
pre .hljs-lisp .hljs-keyword,
pre .hljs-tex .hljs-special,
pre .hljs-input_number {
color: #990073
}
pre .hljs-builtin,
pre .hljs-constructor,
pre .hljs-built_in,
pre .hljs-lisp .hljs-title {
color: #0086b3
}
pre .hljs-preprocessor,
pre .hljs-pi,
pre .hljs-doctype,
pre .hljs-shebang,
pre .hljs-cdata {
color: #999;
font-weight: bold
}
pre .hljs-deletion {
background: #fdd
}
pre .hljs-addition {
background: #dfd
}
pre .hljs-diff .hljs-change {
background: #0086b3
}
pre .hljs-chunk {
color: #aaa
}
pre .hljs-tex .hljs-formula {
opacity: 0.5;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,681 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>helpers.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>helpers.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>This file contains the common helper functions that wed like to share among
the <strong>Lexer</strong>, <strong>Rewriter</strong>, and the <strong>Nodes</strong>. Merge objects, flatten
arrays, count characters, that sort of thing.</p>
</div>
<div class="content"><div class='highlight'><pre>
marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'marked'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>marked.setOptions
renderer: new marked.Renderer()
gfm: true
tables: true
breaks: false
pedantic: false
sanitize: true
smartLists: true
smartypants: false</p>
</div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Peek at the beginning of a given string to see if it matches a sequence.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.starts = <span class="hljs-function"><span class="hljs-params">(string, literal, start)</span> -&gt;</span>
literal <span class="hljs-keyword">is</span> string.substr start, literal.length</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Peek at the end of a given string to see if it matches a sequence.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.ends = <span class="hljs-function"><span class="hljs-params">(string, literal, back)</span> -&gt;</span>
len = literal.length
literal <span class="hljs-keyword">is</span> string.substr string.length - len - (back <span class="hljs-keyword">or</span> <span class="hljs-number">0</span>), len</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Repeat a string <code>n</code> times.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.repeat = repeat = <span class="hljs-function"><span class="hljs-params">(str, n)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Use clever algorithm to have O(log(n)) string concatenation operations.</p>
</div>
<div class="content"><div class='highlight'><pre> res = <span class="hljs-string">''</span>
<span class="hljs-keyword">while</span> n &gt; <span class="hljs-number">0</span>
res += str <span class="hljs-keyword">if</span> n &amp; <span class="hljs-number">1</span>
n &gt;&gt;&gt;= <span class="hljs-number">1</span>
str += str
res</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Trim out all falsy values from an array.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.compact = <span class="hljs-function"><span class="hljs-params">(array)</span> -&gt;</span>
item <span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> array <span class="hljs-keyword">when</span> item</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Count the number of occurrences of a string in a string.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.count = <span class="hljs-function"><span class="hljs-params">(string, substr)</span> -&gt;</span>
num = pos = <span class="hljs-number">0</span>
<span class="hljs-keyword">return</span> <span class="hljs-number">1</span>/<span class="hljs-number">0</span> <span class="hljs-keyword">unless</span> substr.length
num++ <span class="hljs-keyword">while</span> pos = <span class="hljs-number">1</span> + string.indexOf substr, pos
num</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Merge objects, returning a fresh copy with attributes from both sides.
Used every time <code>Base#compile</code> is called, to allow properties in the
options hash to propagate down the tree without polluting other branches.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.merge = <span class="hljs-function"><span class="hljs-params">(options, overrides)</span> -&gt;</span>
extend (extend {}, options), overrides</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Extend a source object with the properties of another object (shallow copy).</p>
</div>
<div class="content"><div class='highlight'><pre>extend = exports.extend = <span class="hljs-function"><span class="hljs-params">(object, properties)</span> -&gt;</span>
<span class="hljs-keyword">for</span> key, val <span class="hljs-keyword">of</span> properties
object[key] = val
object</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Return a flattened version of an array.
Handy for getting a list of <code>children</code> from the nodes.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.flatten = flatten = <span class="hljs-function"><span class="hljs-params">(array)</span> -&gt;</span>
flattened = []
<span class="hljs-keyword">for</span> element <span class="hljs-keyword">in</span> array
<span class="hljs-keyword">if</span> <span class="hljs-string">'[object Array]'</span> <span class="hljs-keyword">is</span> Object::toString.call element
flattened = flattened.concat flatten element
<span class="hljs-keyword">else</span>
flattened.push element
flattened</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Delete a key from an object, returning the value. Useful when a node is
looking for a particular method in an options hash.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.del = <span class="hljs-function"><span class="hljs-params">(obj, key)</span> -&gt;</span>
val = obj[key]
<span class="hljs-keyword">delete</span> obj[key]
val</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Typical Array::some</p>
</div>
<div class="content"><div class='highlight'><pre>exports.some = Array::some ? (fn) -&gt;
<span class="hljs-keyword">return</span> <span class="hljs-literal">true</span> <span class="hljs-keyword">for</span> e <span class="hljs-keyword">in</span> <span class="hljs-keyword">this</span> <span class="hljs-keyword">when</span> fn e
<span class="hljs-literal">false</span></pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Simple function for extracting code from Literate CoffeeScript by stripping
out all non-code blocks, producing a string of CoffeeScript code that can
be compiled “normally.”</p>
</div>
<div class="content"><div class='highlight'><pre>exports.invertLiterate = <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Create a placeholder for tabs, that isnt used anywhere in <code>code</code>, and then
re-insert the tabs after code extraction.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">generateRandomToken</span> = -&gt;</span>
<span class="hljs-string">"<span class="hljs-subst">#{Math.random() * Date.now()}</span>"</span>
<span class="hljs-keyword">while</span> token <span class="hljs-keyword">is</span> <span class="hljs-literal">undefined</span> <span class="hljs-keyword">or</span> code.indexOf(token) <span class="hljs-keyword">isnt</span> <span class="hljs-number">-1</span>
token = generateRandomToken()
code = code.replace <span class="hljs-string">"\t"</span>, token</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Parse as markdown, discard everything except code blocks.</p>
</div>
<div class="content"><div class='highlight'><pre> out = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> marked.lexer code, {}
out += <span class="hljs-string">"<span class="hljs-subst">#{item.text}</span>\n"</span> <span class="hljs-keyword">if</span> item.type <span class="hljs-keyword">is</span> <span class="hljs-string">'code'</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Put the tabs back in.</p>
</div>
<div class="content"><div class='highlight'><pre> out.replace token, <span class="hljs-string">"\t"</span>
out</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Merge two jison-style location data objects together.
If <code>last</code> is not provided, this will simply return <code>first</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildLocationData</span> = <span class="hljs-params">(first, last)</span> -&gt;</span>
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> last
first
<span class="hljs-keyword">else</span>
first_line: first.first_line
first_column: first.first_column
last_line: last.last_line
last_column: last.last_column</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>This returns a function which takes an object as a parameter, and if that
object is an AST node, updates that objects locationData.
The object is returned either way.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.addLocationDataFn = <span class="hljs-function"><span class="hljs-params">(first, last)</span> -&gt;</span>
(obj) -&gt;
<span class="hljs-keyword">if</span> ((<span class="hljs-keyword">typeof</span> obj) <span class="hljs-keyword">is</span> <span class="hljs-string">'object'</span>) <span class="hljs-keyword">and</span> (!!obj[<span class="hljs-string">'updateLocationDataIfMissing'</span>])
obj.updateLocationDataIfMissing buildLocationData(first, last)
<span class="hljs-keyword">return</span> obj</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Convert jison location data to a string.
<code>obj</code> can be a token, or a locationData.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.locationDataToString = <span class="hljs-function"><span class="hljs-params">(obj)</span> -&gt;</span>
<span class="hljs-keyword">if</span> (<span class="hljs-string">"2"</span> <span class="hljs-keyword">of</span> obj) <span class="hljs-keyword">and</span> (<span class="hljs-string">"first_line"</span> <span class="hljs-keyword">of</span> obj[<span class="hljs-number">2</span>]) <span class="hljs-keyword">then</span> locationData = obj[<span class="hljs-number">2</span>]
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> <span class="hljs-string">"first_line"</span> <span class="hljs-keyword">of</span> obj <span class="hljs-keyword">then</span> locationData = obj
<span class="hljs-keyword">if</span> locationData
<span class="hljs-string">"<span class="hljs-subst">#{locationData.first_line + <span class="hljs-number">1</span>}</span>:<span class="hljs-subst">#{locationData.first_column + <span class="hljs-number">1</span>}</span>-"</span> +
<span class="hljs-string">"<span class="hljs-subst">#{locationData.last_line + <span class="hljs-number">1</span>}</span>:<span class="hljs-subst">#{locationData.last_column + <span class="hljs-number">1</span>}</span>"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"No location data"</span></pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>A <code>.coffee.md</code> compatible version of <code>basename</code>, that returns the file sans-extension.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.baseFileName = <span class="hljs-function"><span class="hljs-params">(file, stripExt = <span class="hljs-literal">no</span>, useWinPathSep = <span class="hljs-literal">no</span>)</span> -&gt;</span>
pathSep = <span class="hljs-keyword">if</span> useWinPathSep <span class="hljs-keyword">then</span> <span class="hljs-regexp">/\\|\//</span> <span class="hljs-keyword">else</span> <span class="hljs-regexp">/\//</span>
parts = file.split(pathSep)
file = parts[parts.length - <span class="hljs-number">1</span>]
<span class="hljs-keyword">return</span> file <span class="hljs-keyword">unless</span> stripExt <span class="hljs-keyword">and</span> file.indexOf(<span class="hljs-string">'.'</span>) &gt;= <span class="hljs-number">0</span>
parts = file.split(<span class="hljs-string">'.'</span>)
parts.pop()
parts.pop() <span class="hljs-keyword">if</span> parts[parts.length - <span class="hljs-number">1</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'coffee'</span> <span class="hljs-keyword">and</span> parts.length &gt; <span class="hljs-number">1</span>
parts.join(<span class="hljs-string">'.'</span>)</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Determine if a filename represents a CoffeeScript file.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.isCoffee = <span class="hljs-function"><span class="hljs-params">(file)</span> -&gt;</span> <span class="hljs-regexp">/\.((lit)?coffee|coffee\.md)$/</span>.test file</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Determine if a filename represents a Literate CoffeeScript file.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.isLiterate = <span class="hljs-function"><span class="hljs-params">(file)</span> -&gt;</span> <span class="hljs-regexp">/\.(litcoffee|coffee\.md)$/</span>.test file</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Throws a SyntaxError from a given location.
The errors <code>toString</code> will return an error message following the “standard”
format <code>&lt;filename&gt;:&lt;line&gt;:&lt;col&gt;: &lt;message&gt;</code> plus the line with the error and a
marker showing where the error is.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.throwSyntaxError = <span class="hljs-function"><span class="hljs-params">(message, location)</span> -&gt;</span>
error = <span class="hljs-keyword">new</span> SyntaxError message
error.location = location
error.toString = syntaxErrorToString</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Instead of showing the compilers stacktrace, show our custom error message
(this is useful when the error bubbles up in Node.js applications that
compile CoffeeScript for example).</p>
</div>
<div class="content"><div class='highlight'><pre> error.stack = error.toString()
<span class="hljs-keyword">throw</span> error</pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Update a compiler SyntaxError with source code information if it didnt have
it already.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.updateSyntaxError = <span class="hljs-function"><span class="hljs-params">(error, code, filename)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Avoid screwing up the <code>stack</code> property of other errors (i.e. possible bugs).</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> error.toString <span class="hljs-keyword">is</span> syntaxErrorToString
error.code <span class="hljs-keyword">or</span>= code
error.filename <span class="hljs-keyword">or</span>= filename
error.stack = error.toString()
error
<span class="hljs-function">
<span class="hljs-title">syntaxErrorToString</span> = -&gt;</span>
<span class="hljs-keyword">return</span> Error::toString.call @ <span class="hljs-keyword">unless</span> @code <span class="hljs-keyword">and</span> @location
{first_line, first_column, last_line, last_column} = @location
last_line ?= first_line
last_column ?= first_column
filename = @filename <span class="hljs-keyword">or</span> <span class="hljs-string">'[stdin]'</span>
codeLine = @code.split(<span class="hljs-string">'\n'</span>)[first_line]
start = first_column</pre></div></div>
</li>
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Show only the first line on multi-line errors.</p>
</div>
<div class="content"><div class='highlight'><pre> end = <span class="hljs-keyword">if</span> first_line <span class="hljs-keyword">is</span> last_line <span class="hljs-keyword">then</span> last_column + <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> codeLine.length
marker = codeLine[...start].replace(<span class="hljs-regexp">/[^\s]/g</span>, <span class="hljs-string">' '</span>) + repeat(<span class="hljs-string">'^'</span>, end - start)</pre></div></div>
</li>
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>Check to see if were running on a color-enabled TTY.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> process?
colorsEnabled = process.stdout?.isTTY <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> process.env?.NODE_DISABLE_COLORS
<span class="hljs-keyword">if</span> @colorful ? colorsEnabled
<span class="hljs-function"> <span class="hljs-title">colorize</span> = <span class="hljs-params">(str)</span> -&gt;</span> <span class="hljs-string">"\x1B[1;31m<span class="hljs-subst">#{str}</span>\x1B[0m"</span>
codeLine = codeLine[...start] + colorize(codeLine[start...end]) + codeLine[end..]
marker = colorize marker
<span class="hljs-string">"""
<span class="hljs-subst">#{filename}</span>:<span class="hljs-subst">#{first_line + <span class="hljs-number">1</span>}</span>:<span class="hljs-subst">#{first_column + <span class="hljs-number">1</span>}</span>: error: <span class="hljs-subst">#{@message}</span>
<span class="hljs-subst">#{codeLine}</span>
<span class="hljs-subst">#{marker}</span>
"""</span>
exports.nameWhitespaceCharacter = <span class="hljs-function"><span class="hljs-params">(string)</span> -&gt;</span>
<span class="hljs-keyword">switch</span> string
<span class="hljs-keyword">when</span> <span class="hljs-string">' '</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'space'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'\n'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'newline'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'\r'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'carriage return'</span>
<span class="hljs-keyword">when</span> <span class="hljs-string">'\t'</span> <span class="hljs-keyword">then</span> <span class="hljs-string">'tab'</span>
<span class="hljs-keyword">else</span> string</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,129 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>index.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>index.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>Loader for CoffeeScript as a Node.js library.</p>
</div>
<div class="content"><div class='highlight'><pre>exports[key] = val <span class="hljs-keyword">for</span> key, val <span class="hljs-keyword">of</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span></pre></div></div>
</li>
</ul>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,366 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>optparse.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>optparse.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>{repeat} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>A simple <strong>OptionParser</strong> class to parse option flags from the command-line.
Use it like so:</p>
<pre><code>parser = <span class="hljs-keyword">new</span> OptionParser switches, helpBanner
options = parser.parse process.argv
</code></pre><p>The first non-option is considered to be the start of the file (and file
option) list, and all subsequent arguments are left unparsed.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.OptionParser = <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OptionParser</span></span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Initialize with a list of valid options, in the form:</p>
<pre><code>[short-flag, long-flag, description]
</code></pre><p>Along with an optional banner for the usage help.</p>
</div>
<div class="content"><div class='highlight'><pre> constructor: <span class="hljs-function"><span class="hljs-params">(rules, @banner)</span> -&gt;</span>
@rules = buildRules rules</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Parse the list of arguments, populating an <code>options</code> object with all of the
specified options, and return it. Options after the first non-option
argument are treated as arguments. <code>options.arguments</code> will be an array
containing the remaining arguments. This is a simpler API than many option
parsers that allow you to attach callback actions for every flag. Instead,
youre responsible for interpreting the options object.</p>
</div>
<div class="content"><div class='highlight'><pre> parse: <span class="hljs-function"><span class="hljs-params">(args)</span> -&gt;</span>
options = arguments: []
skippingArgument = <span class="hljs-literal">no</span>
originalArgs = args
args = normalizeArguments args
<span class="hljs-keyword">for</span> arg, i <span class="hljs-keyword">in</span> args
<span class="hljs-keyword">if</span> skippingArgument
skippingArgument = <span class="hljs-literal">no</span>
<span class="hljs-keyword">continue</span>
<span class="hljs-keyword">if</span> arg <span class="hljs-keyword">is</span> <span class="hljs-string">'--'</span>
pos = originalArgs.indexOf <span class="hljs-string">'--'</span>
options.arguments = options.arguments.concat originalArgs[(pos + <span class="hljs-number">1</span>)..]
<span class="hljs-keyword">break</span>
isOption = !!(arg.match(LONG_FLAG) <span class="hljs-keyword">or</span> arg.match(SHORT_FLAG))</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>the CS option parser is a little odd; options after the first
non-option argument are treated as non-option arguments themselves</p>
</div>
<div class="content"><div class='highlight'><pre> seenNonOptionArg = options.arguments.length &gt; <span class="hljs-number">0</span>
<span class="hljs-keyword">unless</span> seenNonOptionArg
matchedRule = <span class="hljs-literal">no</span>
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules
<span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">is</span> arg <span class="hljs-keyword">or</span> rule.longFlag <span class="hljs-keyword">is</span> arg
value = <span class="hljs-literal">true</span>
<span class="hljs-keyword">if</span> rule.hasArgument
skippingArgument = <span class="hljs-literal">yes</span>
value = args[i + <span class="hljs-number">1</span>]
options[rule.name] = <span class="hljs-keyword">if</span> rule.isList <span class="hljs-keyword">then</span> (options[rule.name] <span class="hljs-keyword">or</span> []).concat value <span class="hljs-keyword">else</span> value
matchedRule = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">break</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"unrecognized option: <span class="hljs-subst">#{arg}</span>"</span> <span class="hljs-keyword">if</span> isOption <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> matchedRule
<span class="hljs-keyword">if</span> seenNonOptionArg <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> isOption
options.arguments.push arg
options</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Return the help text for this <strong>OptionParser</strong>, listing and describing all
of the valid options, for <code>--help</code> and such.</p>
</div>
<div class="content"><div class='highlight'><pre> help: <span class="hljs-function">-&gt;</span>
lines = []
lines.unshift <span class="hljs-string">"<span class="hljs-subst">#{@banner}</span>\n"</span> <span class="hljs-keyword">if</span> @banner
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules
spaces = <span class="hljs-number">15</span> - rule.longFlag.length
spaces = <span class="hljs-keyword">if</span> spaces &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> repeat <span class="hljs-string">' '</span>, spaces <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
letPart = <span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">then</span> rule.shortFlag + <span class="hljs-string">', '</span> <span class="hljs-keyword">else</span> <span class="hljs-string">' '</span>
lines.push <span class="hljs-string">' '</span> + letPart + rule.longFlag + spaces + rule.description
<span class="hljs-string">"\n<span class="hljs-subst">#{ lines.join(<span class="hljs-string">'\n'</span>) }</span>\n"</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<h2 id="helpers">Helpers</h2>
</div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
</div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Regex matchers for option flags.</p>
</div>
<div class="content"><div class='highlight'><pre>LONG_FLAG = <span class="hljs-regexp">/^(--\w[\w\-]*)/</span>
SHORT_FLAG = <span class="hljs-regexp">/^(-\w)$/</span>
MULTI_FLAG = <span class="hljs-regexp">/^-(\w{2,})/</span>
OPTIONAL = <span class="hljs-regexp">/\[(\w+(\*?))\]/</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Build and return the list of option rules. If the optional <em>short-flag</em> is
unspecified, leave it out by padding with <code>null</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRules</span> = <span class="hljs-params">(rules)</span> -&gt;</span>
<span class="hljs-keyword">for</span> tuple <span class="hljs-keyword">in</span> rules
tuple.unshift <span class="hljs-literal">null</span> <span class="hljs-keyword">if</span> tuple.length &lt; <span class="hljs-number">3</span>
buildRule tuple...</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Build a rule from a <code>-o</code> short flag, a <code>--output [DIR]</code> long flag, and the
description of what the option does.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRule</span> = <span class="hljs-params">(shortFlag, longFlag, description, options = {})</span> -&gt;</span>
match = longFlag.match(OPTIONAL)
longFlag = longFlag.match(LONG_FLAG)[<span class="hljs-number">1</span>]
{
name: longFlag.substr <span class="hljs-number">2</span>
shortFlag: shortFlag
longFlag: longFlag
description: description
hasArgument: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">1</span>])
isList: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">2</span>])
}</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Normalize arguments by expanding merged flags into multiple flags. This allows
you to have <code>-wl</code> be the same as <code>--watch --lint</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">normalizeArguments</span> = <span class="hljs-params">(args)</span> -&gt;</span>
args = args[..]
result = []
<span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> args
<span class="hljs-keyword">if</span> match = arg.match MULTI_FLAG
result.push <span class="hljs-string">'-'</span> + l <span class="hljs-keyword">for</span> l <span class="hljs-keyword">in</span> match[<span class="hljs-number">1</span>].split <span class="hljs-string">''</span>
<span class="hljs-keyword">else</span>
result.push arg
result</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,375 +0,0 @@
/*! normalize.css v2.0.1 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
/*
* Corrects `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
}
/*
* Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/*
* Addresses styling for `hidden` attribute not present in IE 8/9.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/*
* 1. Sets default font family to sans-serif.
* 2. Prevents iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/*
* Removes default margin.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/*
* Addresses `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/*
* Improves readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/*
* Addresses `h1` font sizes within `section` and `article` in Firefox 4+,
* Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
}
/*
* Addresses styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/*
* Addresses styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/*
* Addresses styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/*
* Corrects font family set oddly in Safari 5 and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/*
* Improves readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* Sets consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/*
* Addresses inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/*
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/*
* Removes border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/*
* Corrects overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/*
* Addresses margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/*
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/*
* 1. Corrects font family not being inherited in all browsers.
* 2. Corrects font size not being inherited in all browsers.
* 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome
*/
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
/*
* Addresses Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/*
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/*
* Re-set default cursor for disabled elements.
*/
button[disabled],
input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to `content-box` in IE 8/9.
* 2. Removes excess padding in IE 8/9.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/*
* Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
* Removes inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE 8/9.
* 2. Improves readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/*
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@@ -1,251 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>register.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>register.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
child_process = <span class="hljs-built_in">require</span> <span class="hljs-string">'child_process'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Load and run a CoffeeScript file for Node, stripping any <code>BOM</code>s.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">loadFile</span> = <span class="hljs-params">(<span class="hljs-built_in">module</span>, filename)</span> -&gt;</span>
answer = CoffeeScript._compileFile filename, <span class="hljs-literal">no</span>, <span class="hljs-literal">yes</span>
<span class="hljs-built_in">module</span>._compile answer, filename</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>If the installed version of Node supports <code>require.extensions</code>, register
CoffeeScript as an extension.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">require</span>.extensions
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> CoffeeScript.FILE_EXTENSIONS
<span class="hljs-built_in">require</span>.extensions[ext] = loadFile</pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Patch Nodes module loader to be able to handle multi-dot extensions.
This is a horrible thing that should not be required.</p>
</div>
<div class="content"><div class='highlight'><pre> Module = <span class="hljs-built_in">require</span> <span class="hljs-string">'module'</span>
<span class="hljs-function">
<span class="hljs-title">findExtension</span> = <span class="hljs-params">(filename)</span> -&gt;</span>
extensions = path.basename(filename).split <span class="hljs-string">'.'</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Remove the initial dot from dotfiles.</p>
</div>
<div class="content"><div class='highlight'><pre> extensions.shift() <span class="hljs-keyword">if</span> extensions[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">''</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Start with the longest possible extension and work our way shortwards.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> extensions.shift()
curExtension = <span class="hljs-string">'.'</span> + extensions.join <span class="hljs-string">'.'</span>
<span class="hljs-keyword">return</span> curExtension <span class="hljs-keyword">if</span> Module._extensions[curExtension]
<span class="hljs-string">'.js'</span>
Module::load = <span class="hljs-function"><span class="hljs-params">(filename)</span> -&gt;</span>
@filename = filename
@paths = Module._nodeModulePaths path.dirname filename
extension = findExtension filename
Module._extensions[extension](<span class="hljs-keyword">this</span>, filename)
@loaded = <span class="hljs-literal">true</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>If were on Node, patch <code>child_process.fork</code> so that Coffee scripts are able
to fork both CoffeeScript files, and JavaScript files, directly.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> child_process
{fork} = child_process
binary = <span class="hljs-built_in">require</span>.resolve <span class="hljs-string">'../../bin/coffee'</span>
child_process.fork = <span class="hljs-function"><span class="hljs-params">(path, args, options)</span> -&gt;</span>
<span class="hljs-keyword">if</span> helpers.isCoffee path
<span class="hljs-keyword">unless</span> Array.isArray args
options = args <span class="hljs-keyword">or</span> {}
args = []
args = [path].concat args
path = binary
fork path, args, options</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,624 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>repl.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>repl.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
nodeREPL = <span class="hljs-built_in">require</span> <span class="hljs-string">'repl'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
{merge, updateSyntaxError} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
replDefaults =
prompt: <span class="hljs-string">'coffee&gt; '</span>,
historyFile: path.join process.env.HOME, <span class="hljs-string">'.coffee_history'</span> <span class="hljs-keyword">if</span> process.env.HOME
historyMaxInputSize: <span class="hljs-number">10240</span>
eval: <span class="hljs-function"><span class="hljs-params">(input, context, filename, cb)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>XXX: multiline hack.</p>
</div>
<div class="content"><div class='highlight'><pre> input = input.replace <span class="hljs-regexp">/\uFF00/g</span>, <span class="hljs-string">'\n'</span></pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Nodes REPL sends the input ending with a newline and then wrapped in
parens. Unwrap all that.</p>
</div>
<div class="content"><div class='highlight'><pre> input = input.replace <span class="hljs-regexp">/^\(([\s\S]*)\n\)$/m</span>, <span class="hljs-string">'$1'</span></pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Nodes REPL v6.9.1+ sends the input wrapped in a try/catch statement.
Unwrap that too.</p>
</div>
<div class="content"><div class='highlight'><pre> input = input.replace <span class="hljs-regexp">/^\s*try\s*{([\s\S]*)}\s*catch.*$/m</span>, <span class="hljs-string">'$1'</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Require AST nodes to do some AST manipulation.</p>
</div>
<div class="content"><div class='highlight'><pre> {Block, Assign, Value, Literal} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./nodes'</span>
<span class="hljs-keyword">try</span></pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Tokenize the clean input.</p>
</div>
<div class="content"><div class='highlight'><pre> tokens = CoffeeScript.tokens input</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Collect referenced variable names just like in <code>CoffeeScript.compile</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> referencedVars = (
token[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">when</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>
)</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Generate the AST of the tokens.</p>
</div>
<div class="content"><div class='highlight'><pre> ast = CoffeeScript.nodes tokens</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Add assignment to <code>_</code> variable to force the input to be an expression.</p>
</div>
<div class="content"><div class='highlight'><pre> ast = <span class="hljs-keyword">new</span> Block [
<span class="hljs-keyword">new</span> Assign (<span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> Literal <span class="hljs-string">'_'</span>), ast, <span class="hljs-string">'='</span>
]
js = ast.compile {bare: <span class="hljs-literal">yes</span>, locals: Object.keys(context), referencedVars}
cb <span class="hljs-literal">null</span>, runInContext js, context, filename
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>ASTs <code>compile</code> does not add source code information to syntax errors.</p>
</div>
<div class="content"><div class='highlight'><pre> updateSyntaxError err, input
cb err
<span class="hljs-function">
<span class="hljs-title">runInContext</span> = <span class="hljs-params">(js, context, filename)</span> -&gt;</span>
<span class="hljs-keyword">if</span> context <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js, filename
<span class="hljs-keyword">else</span>
vm.runInContext js, context, filename
<span class="hljs-function">
<span class="hljs-title">addMultilineHandler</span> = <span class="hljs-params">(repl)</span> -&gt;</span>
{rli, inputStream, outputStream} = repl</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Node 0.11.12 changed API, prompt is now _prompt.</p>
</div>
<div class="content"><div class='highlight'><pre> origPrompt = repl._prompt ? repl.prompt
multiline =
enabled: <span class="hljs-literal">off</span>
initialPrompt: origPrompt.replace <span class="hljs-regexp">/^[^&gt; ]*/</span>, <span class="hljs-function"><span class="hljs-params">(x)</span> -&gt;</span> x.replace <span class="hljs-regexp">/./g</span>, <span class="hljs-string">'-'</span>
prompt: origPrompt.replace <span class="hljs-regexp">/^[^&gt; ]*&gt;?/</span>, <span class="hljs-function"><span class="hljs-params">(x)</span> -&gt;</span> x.replace <span class="hljs-regexp">/./g</span>, <span class="hljs-string">'.'</span>
buffer: <span class="hljs-string">''</span></pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Proxy nodes line listener</p>
</div>
<div class="content"><div class='highlight'><pre> nodeLineListener = rli.listeners(<span class="hljs-string">'line'</span>)[<span class="hljs-number">0</span>]
rli.removeListener <span class="hljs-string">'line'</span>, nodeLineListener
rli.<span class="hljs-literal">on</span> <span class="hljs-string">'line'</span>, <span class="hljs-function"><span class="hljs-params">(cmd)</span> -&gt;</span>
<span class="hljs-keyword">if</span> multiline.enabled
multiline.buffer += <span class="hljs-string">"<span class="hljs-subst">#{cmd}</span>\n"</span>
rli.setPrompt multiline.prompt
rli.prompt <span class="hljs-literal">true</span>
<span class="hljs-keyword">else</span>
rli.setPrompt origPrompt
nodeLineListener cmd
<span class="hljs-keyword">return</span></pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Handle Ctrl-v</p>
</div>
<div class="content"><div class='highlight'><pre> inputStream.<span class="hljs-literal">on</span> <span class="hljs-string">'keypress'</span>, <span class="hljs-function"><span class="hljs-params">(char, key)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> key <span class="hljs-keyword">and</span> key.ctrl <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> key.meta <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> key.shift <span class="hljs-keyword">and</span> key.name <span class="hljs-keyword">is</span> <span class="hljs-string">'v'</span>
<span class="hljs-keyword">if</span> multiline.enabled</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>allow arbitrarily switching between modes any time before multiple lines are entered</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> multiline.buffer.match <span class="hljs-regexp">/\n/</span>
multiline.enabled = <span class="hljs-keyword">not</span> multiline.enabled
rli.setPrompt origPrompt
rli.prompt <span class="hljs-literal">true</span>
<span class="hljs-keyword">return</span></pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>no-op unless the current line is empty</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> rli.line? <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> rli.line.match <span class="hljs-regexp">/^\s*$/</span></pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>eval, print, loop</p>
</div>
<div class="content"><div class='highlight'><pre> multiline.enabled = <span class="hljs-keyword">not</span> multiline.enabled
rli.line = <span class="hljs-string">''</span>
rli.cursor = <span class="hljs-number">0</span>
rli.output.cursorTo <span class="hljs-number">0</span>
rli.output.clearLine <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>XXX: multiline hack</p>
</div>
<div class="content"><div class='highlight'><pre> multiline.buffer = multiline.buffer.replace <span class="hljs-regexp">/\n/g</span>, <span class="hljs-string">'\uFF00'</span>
rli.emit <span class="hljs-string">'line'</span>, multiline.buffer
multiline.buffer = <span class="hljs-string">''</span>
<span class="hljs-keyword">else</span>
multiline.enabled = <span class="hljs-keyword">not</span> multiline.enabled
rli.setPrompt multiline.initialPrompt
rli.prompt <span class="hljs-literal">true</span>
<span class="hljs-keyword">return</span></pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Store and load command history from a file</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">addHistory</span> = <span class="hljs-params">(repl, filename, maxSize)</span> -&gt;</span>
lastLine = <span class="hljs-literal">null</span>
<span class="hljs-keyword">try</span></pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Get file info and at most maxSize of command history</p>
</div>
<div class="content"><div class='highlight'><pre> stat = fs.statSync filename
size = Math.min maxSize, stat.size</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Read last <code>size</code> bytes from the file</p>
</div>
<div class="content"><div class='highlight'><pre> readFd = fs.openSync filename, <span class="hljs-string">'r'</span>
buffer = Buffer.alloc size
fs.readSync readFd, buffer, <span class="hljs-number">0</span>, size, stat.size - size
fs.closeSync readFd</pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Set the history on the interpreter</p>
</div>
<div class="content"><div class='highlight'><pre> repl.rli.history = buffer.toString().split(<span class="hljs-string">'\n'</span>).reverse()</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>If the history file was truncated we should pop off a potential partial line</p>
</div>
<div class="content"><div class='highlight'><pre> repl.rli.history.pop() <span class="hljs-keyword">if</span> stat.size &gt; maxSize</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Shift off the final blank newline</p>
</div>
<div class="content"><div class='highlight'><pre> repl.rli.history.shift() <span class="hljs-keyword">if</span> repl.rli.history[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">''</span>
repl.rli.historyIndex = <span class="hljs-number">-1</span>
lastLine = repl.rli.history[<span class="hljs-number">0</span>]
fd = fs.openSync filename, <span class="hljs-string">'a'</span>
repl.rli.addListener <span class="hljs-string">'line'</span>, <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span>
<span class="hljs-keyword">if</span> code <span class="hljs-keyword">and</span> code.length <span class="hljs-keyword">and</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'.history'</span> <span class="hljs-keyword">and</span> code <span class="hljs-keyword">isnt</span> <span class="hljs-string">'.exit'</span> <span class="hljs-keyword">and</span> lastLine <span class="hljs-keyword">isnt</span> code</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Save the latest command in the file</p>
</div>
<div class="content"><div class='highlight'><pre> fs.writeSync fd, <span class="hljs-string">"<span class="hljs-subst">#{code}</span>\n"</span>
lastLine = code
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function">-&gt;</span> fs.closeSync fd</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Add a command to show the history stack</p>
</div>
<div class="content"><div class='highlight'><pre> repl.commands[getCommandId(repl, <span class="hljs-string">'history'</span>)] =
help: <span class="hljs-string">'Show command history'</span>
action: <span class="hljs-function">-&gt;</span>
repl.outputStream.write <span class="hljs-string">"<span class="hljs-subst">#{repl.rli.history[..].reverse().join <span class="hljs-string">'\n'</span>}</span>\n"</span>
repl.displayPrompt()
<span class="hljs-function">
<span class="hljs-title">getCommandId</span> = <span class="hljs-params">(repl, commandName)</span> -&gt;</span></pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Node 0.11 changed API, a command such as .help is now stored as help</p>
</div>
<div class="content"><div class='highlight'><pre> commandsHaveLeadingDot = repl.commands[<span class="hljs-string">'.help'</span>]?
<span class="hljs-keyword">if</span> commandsHaveLeadingDot <span class="hljs-keyword">then</span> <span class="hljs-string">".<span class="hljs-subst">#{commandName}</span>"</span> <span class="hljs-keyword">else</span> commandName
<span class="hljs-built_in">module</span>.exports =
start: <span class="hljs-function"><span class="hljs-params">(opts = {})</span> -&gt;</span>
[major, minor, build] = process.versions.node.split(<span class="hljs-string">'.'</span>).map (n) -&gt; parseInt(n)
<span class="hljs-keyword">if</span> major &lt; <span class="hljs-number">6</span>
<span class="hljs-built_in">console</span>.warn <span class="hljs-string">"Node 6+ required for CoffeeScript REPL"</span>
process.exit <span class="hljs-number">1</span>
CoffeeScript.register()
process.argv = [<span class="hljs-string">'coffee'</span>].concat process.argv[<span class="hljs-number">2.</span>.]
opts = merge replDefaults, opts
repl = nodeREPL.start opts
runInContext opts.prelude, repl.context, <span class="hljs-string">'prelude'</span> <span class="hljs-keyword">if</span> opts.prelude
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function">-&gt;</span> repl.outputStream.write <span class="hljs-string">'\n'</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> repl.rli.closed
addMultilineHandler repl
addHistory repl, opts.historyFile, opts.historyMaxInputSize <span class="hljs-keyword">if</span> opts.historyFile</pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Adapt help inherited from the node REPL</p>
</div>
<div class="content"><div class='highlight'><pre> repl.commands[getCommandId(repl, <span class="hljs-string">'load'</span>)].help = <span class="hljs-string">'Load code from a file into this REPL session'</span>
repl</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,398 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>scope.litcoffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>scope.litcoffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>The <strong>Scope</strong> class regulates lexical scoping within CoffeeScript. As you
generate code, you create a tree of scopes in the same shape as the nested
function bodies. Each scope knows about the variables declared within it,
and has a reference to its parent enclosing scope. In this way, we know which
variables are new and need to be declared with <code>var</code>, and which are shared
with external scopes.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.Scope = <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Scope</span></span></pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Initialize a scope with its parent, for lookups up the chain,
as well as a reference to the <strong>Block</strong> node it belongs to, which is
where it should declare its variables, a reference to the function that
it belongs to, and a list of variables referenced in the source code
and therefore should be avoided when generating variables.</p>
</div>
<div class="content"><div class='highlight'><pre> constructor: <span class="hljs-function"><span class="hljs-params">(@parent, @expressions, @method, @referencedVars)</span> -&gt;</span>
@variables = [{name: <span class="hljs-string">'arguments'</span>, type: <span class="hljs-string">'arguments'</span>}]
@positions = {}
@utilities = {} <span class="hljs-keyword">unless</span> @parent</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>The <code>@root</code> is the top-level <strong>Scope</strong> object for a given file.</p>
</div>
<div class="content"><div class='highlight'><pre> @root = @parent?.root ? <span class="hljs-keyword">this</span></pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Adds a new variable or overrides an existing one.</p>
</div>
<div class="content"><div class='highlight'><pre> add: <span class="hljs-function"><span class="hljs-params">(name, type, immediate)</span> -&gt;</span>
<span class="hljs-keyword">return</span> @parent.add name, type, immediate <span class="hljs-keyword">if</span> @shared <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> immediate
<span class="hljs-keyword">if</span> Object::hasOwnProperty.call @positions, name
@variables[@positions[name]].type = type
<span class="hljs-keyword">else</span>
@positions[name] = @variables.push({name, type}) - <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>When <code>super</code> is called, we need to find the name of the current method were
in, so that we know how to invoke the same method of the parent class. This
can get complicated if super is being called from an inner function.
<code>namedMethod</code> will walk up the scope tree until it either finds the first
function object that has a name filled in, or bottoms out.</p>
</div>
<div class="content"><div class='highlight'><pre> namedMethod: <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">return</span> @method <span class="hljs-keyword">if</span> @method?.name <span class="hljs-keyword">or</span> !@parent
@parent.namedMethod()</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Look up a variable name in lexical scope, and declare it if it does not
already exist.</p>
</div>
<div class="content"><div class='highlight'><pre> find: <span class="hljs-function"><span class="hljs-params">(name, type = <span class="hljs-string">'var'</span>)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-literal">yes</span> <span class="hljs-keyword">if</span> @check name
@add name, type
<span class="hljs-literal">no</span></pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Reserve a variable name as originating from a function parameter for this
scope. No <code>var</code> required for internal references.</p>
</div>
<div class="content"><div class='highlight'><pre> parameter: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> @shared <span class="hljs-keyword">and</span> @parent.check name, <span class="hljs-literal">yes</span>
@add name, <span class="hljs-string">'param'</span></pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Just check to see if a variable has already been declared, without reserving,
walks up to the root scope.</p>
</div>
<div class="content"><div class='highlight'><pre> check: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
!!(@type(name) <span class="hljs-keyword">or</span> @parent?.check(name))</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Generate a temporary variable name at the given index.</p>
</div>
<div class="content"><div class='highlight'><pre> temporary: <span class="hljs-function"><span class="hljs-params">(name, index, single=<span class="hljs-literal">false</span>)</span> -&gt;</span>
<span class="hljs-keyword">if</span> single
startCode = name.charCodeAt(<span class="hljs-number">0</span>)
endCode = <span class="hljs-string">'z'</span>.charCodeAt(<span class="hljs-number">0</span>)
diff = endCode - startCode
newCode = startCode + index % (diff + <span class="hljs-number">1</span>)
letter = String.fromCharCode(newCode)
num = index <span class="hljs-regexp">//</span> (diff + <span class="hljs-number">1</span>)
<span class="hljs-string">"<span class="hljs-subst">#{letter}</span><span class="hljs-subst">#{num <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>}</span>"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"<span class="hljs-subst">#{name}</span><span class="hljs-subst">#{index <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>}</span>"</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Gets the type of a variable.</p>
</div>
<div class="content"><div class='highlight'><pre> type: <span class="hljs-function"><span class="hljs-params">(name)</span> -&gt;</span>
<span class="hljs-keyword">return</span> v.type <span class="hljs-keyword">for</span> v <span class="hljs-keyword">in</span> @variables <span class="hljs-keyword">when</span> v.name <span class="hljs-keyword">is</span> name
<span class="hljs-literal">null</span></pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>If we need to store an intermediate result, find an available name for a
compiler-generated variable. <code>_var</code>, <code>_var2</code>, and so on…</p>
</div>
<div class="content"><div class='highlight'><pre> freeVariable: <span class="hljs-function"><span class="hljs-params">(name, options={})</span> -&gt;</span>
index = <span class="hljs-number">0</span>
<span class="hljs-keyword">loop</span>
temp = @temporary name, index, options.single
<span class="hljs-keyword">break</span> <span class="hljs-keyword">unless</span> @check(temp) <span class="hljs-keyword">or</span> temp <span class="hljs-keyword">in</span> @root.referencedVars
index++
@add temp, <span class="hljs-string">'var'</span>, <span class="hljs-literal">yes</span> <span class="hljs-keyword">if</span> options.reserve ? <span class="hljs-literal">true</span>
temp</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Ensure that an assignment is made at the top of this scope
(or at the top-level scope, if requested).</p>
</div>
<div class="content"><div class='highlight'><pre> assign: <span class="hljs-function"><span class="hljs-params">(name, value)</span> -&gt;</span>
@add name, {value, assigned: <span class="hljs-literal">yes</span>}, <span class="hljs-literal">yes</span>
@hasAssignments = <span class="hljs-literal">yes</span></pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Does this scope have any declared variables?</p>
</div>
<div class="content"><div class='highlight'><pre> hasDeclarations: <span class="hljs-function">-&gt;</span>
!!@declaredVariables().length</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Return the list of variables first declared in this scope.</p>
</div>
<div class="content"><div class='highlight'><pre> declaredVariables: <span class="hljs-function">-&gt;</span>
(v.name <span class="hljs-keyword">for</span> v <span class="hljs-keyword">in</span> @variables <span class="hljs-keyword">when</span> v.type <span class="hljs-keyword">is</span> <span class="hljs-string">'var'</span>).sort()</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Return the list of assignments that are supposed to be made at the top
of this scope.</p>
</div>
<div class="content"><div class='highlight'><pre> assignedVariables: <span class="hljs-function">-&gt;</span>
<span class="hljs-string">"<span class="hljs-subst">#{v.name}</span> = <span class="hljs-subst">#{v.type.value}</span>"</span> <span class="hljs-keyword">for</span> v <span class="hljs-keyword">in</span> @variables <span class="hljs-keyword">when</span> v.type.assigned</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,523 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>sourcemap.litcoffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page_wrapper">
<div id="jump_page">
<a class="source" href="browser.html">
browser.coffee
</a>
<a class="source" href="cake.html">
cake.coffee
</a>
<a class="source" href="coffeescript.html">
coffeescript.coffee
</a>
<a class="source" href="command.html">
command.coffee
</a>
<a class="source" href="grammar.html">
grammar.coffee
</a>
<a class="source" href="helpers.html">
helpers.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
<a class="source" href="lexer.html">
lexer.coffee
</a>
<a class="source" href="nodes.html">
nodes.coffee
</a>
<a class="source" href="optparse.html">
optparse.coffee
</a>
<a class="source" href="register.html">
register.coffee
</a>
<a class="source" href="repl.html">
repl.coffee
</a>
<a class="source" href="rewriter.html">
rewriter.coffee
</a>
<a class="source" href="scope.html">
scope.litcoffee
</a>
<a class="source" href="sourcemap.html">
sourcemap.litcoffee
</a>
</div>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>sourcemap.litcoffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>Source maps allow JavaScript runtimes to match running JavaScript back to
the original source code that corresponds to it. This can be minified
JavaScript, but in our case, were concerned with mapping pretty-printed
JavaScript back to CoffeeScript.</p>
<p>In order to produce maps, we must keep track of positions (line number, column number)
that originated every node in the syntax tree, and be able to generate a
<a href="https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit">map file</a>
— which is a compact, VLQ-encoded representation of the JSON serialization
of this information — to write out alongside the generated JavaScript.</p>
<h2 id="linemap">LineMap</h2>
</div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>A <strong>LineMap</strong> object keeps track of information about original line and column
positions for a single line of output JavaScript code.
<strong>SourceMaps</strong> are implemented in terms of <strong>LineMaps</strong>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">LineMap</span></span>
constructor: <span class="hljs-function"><span class="hljs-params">(@line)</span> -&gt;</span>
@columns = []
add: <span class="hljs-function"><span class="hljs-params">(column, [sourceLine, sourceColumn], options={})</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> @columns[column] <span class="hljs-keyword">and</span> options.noReplace
@columns[column] = {line: @line, column, sourceLine, sourceColumn}
sourceLocation: <span class="hljs-function"><span class="hljs-params">(column)</span> -&gt;</span>
column-- <span class="hljs-keyword">until</span> (mapping = @columns[column]) <span class="hljs-keyword">or</span> (column &lt;= <span class="hljs-number">0</span>)
mapping <span class="hljs-keyword">and</span> [mapping.sourceLine, mapping.sourceColumn]</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<h2 id="sourcemap">SourceMap</h2>
</div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Maps locations in a single generated JavaScript file back to locations in
the original CoffeeScript source file.</p>
<p>This is intentionally agnostic towards how a source map might be represented on
disk. Once the compiler is ready to produce a “v3”-style source map, we can walk
through the arrays of line and column buffer to produce it.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SourceMap</span></span>
constructor: <span class="hljs-function">-&gt;</span>
@lines = []</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Adds a mapping to this SourceMap. <code>sourceLocation</code> and <code>generatedLocation</code>
are both <code>[line, column]</code> arrays. If <code>options.noReplace</code> is true, then if there
is already a mapping for the specified <code>line</code> and <code>column</code>, this will have no
effect.</p>
</div>
<div class="content"><div class='highlight'><pre> add: <span class="hljs-function"><span class="hljs-params">(sourceLocation, generatedLocation, options = {})</span> -&gt;</span>
[line, column] = generatedLocation
lineMap = (@lines[line] <span class="hljs-keyword">or</span>= <span class="hljs-keyword">new</span> LineMap(line))
lineMap.add column, sourceLocation, options</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Look up the original position of a given <code>line</code> and <code>column</code> in the generated
code.</p>
</div>
<div class="content"><div class='highlight'><pre> sourceLocation: <span class="hljs-function"><span class="hljs-params">([line, column])</span> -&gt;</span>
line-- <span class="hljs-keyword">until</span> (lineMap = @lines[line]) <span class="hljs-keyword">or</span> (line &lt;= <span class="hljs-number">0</span>)
lineMap <span class="hljs-keyword">and</span> lineMap.sourceLocation column</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<h2 id="v3-sourcemap-generation">V3 SourceMap Generation</h2>
</div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Builds up a V3 source map, returning the generated JSON as a string.
<code>options.sourceRoot</code> may be used to specify the sourceRoot written to the source
map. Also, <code>options.sourceFiles</code> and <code>options.generatedFile</code> may be passed to
set “sources” and “file”, respectively.</p>
</div>
<div class="content"><div class='highlight'><pre> generate: <span class="hljs-function"><span class="hljs-params">(options = {}, code = <span class="hljs-literal">null</span>)</span> -&gt;</span>
writingline = <span class="hljs-number">0</span>
lastColumn = <span class="hljs-number">0</span>
lastSourceLine = <span class="hljs-number">0</span>
lastSourceColumn = <span class="hljs-number">0</span>
needComma = <span class="hljs-literal">no</span>
buffer = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> lineMap, lineNumber <span class="hljs-keyword">in</span> @lines <span class="hljs-keyword">when</span> lineMap
<span class="hljs-keyword">for</span> mapping <span class="hljs-keyword">in</span> lineMap.columns <span class="hljs-keyword">when</span> mapping
<span class="hljs-keyword">while</span> writingline &lt; mapping.line
lastColumn = <span class="hljs-number">0</span>
needComma = <span class="hljs-literal">no</span>
buffer += <span class="hljs-string">";"</span>
writingline++</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Write a comma if weve already written a segment on this line.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> needComma
buffer += <span class="hljs-string">","</span>
needComma = <span class="hljs-literal">no</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Write the next segment. Segments can be 1, 4, or 5 values. If just one, then it
is a generated column which doesnt match anything in the source code.</p>
<p>The starting column in the generated source, relative to any previous recorded
column for the current line:</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq mapping.column - lastColumn
lastColumn = mapping.column</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>The index into the list of sources:</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq <span class="hljs-number">0</span></pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>The starting line in the original source, relative to the previous source line.</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq mapping.sourceLine - lastSourceLine
lastSourceLine = mapping.sourceLine</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>The starting column in the original source, relative to the previous column.</p>
</div>
<div class="content"><div class='highlight'><pre> buffer += @encodeVlq mapping.sourceColumn - lastSourceColumn
lastSourceColumn = mapping.sourceColumn
needComma = <span class="hljs-literal">yes</span></pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Produce the canonical JSON object format for a “v3” source map.</p>
</div>
<div class="content"><div class='highlight'><pre> v3 =
version: <span class="hljs-number">3</span>
file: options.generatedFile <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>
sourceRoot: options.sourceRoot <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>
sources: options.sourceFiles <span class="hljs-keyword">or</span> [<span class="hljs-string">''</span>]
names: []
mappings: buffer
v3.sourcesContent = [code] <span class="hljs-keyword">if</span> options.inlineMap
v3</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<h2 id="base64-vlq-encoding">Base64 VLQ Encoding</h2>
</div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Note that SourceMap VLQ encoding is “backwards”. MIDI-style VLQ encoding puts
the most-significant-bit (MSB) from the original value into the MSB of the VLQ
encoded value (see <a href="http://en.wikipedia.org/wiki/File:Uintvar_coding.svg">Wikipedia</a>).
SourceMap VLQ does things the other way around, with the least significat four
bits of the original value encoded into the first byte of the VLQ encoded value.</p>
</div>
<div class="content"><div class='highlight'><pre> VLQ_SHIFT = <span class="hljs-number">5</span>
VLQ_CONTINUATION_BIT = <span class="hljs-number">1</span> &lt;&lt; VLQ_SHIFT <span class="hljs-comment"># 0010 0000</span>
VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - <span class="hljs-number">1</span> <span class="hljs-comment"># 0001 1111</span>
encodeVlq: <span class="hljs-function"><span class="hljs-params">(value)</span> -&gt;</span>
answer = <span class="hljs-string">''</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Least significant bit represents the sign.</p>
</div>
<div class="content"><div class='highlight'><pre> signBit = <span class="hljs-keyword">if</span> value &lt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> <span class="hljs-number">0</span></pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>The next bits are the actual value.</p>
</div>
<div class="content"><div class='highlight'><pre> valueToEncode = (Math.abs(value) &lt;&lt; <span class="hljs-number">1</span>) + signBit</pre></div></div>
</li>
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Make sure we encode at least one character, even if valueToEncode is 0.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">while</span> valueToEncode <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> answer
nextChunk = valueToEncode &amp; VLQ_VALUE_MASK
valueToEncode = valueToEncode &gt;&gt; VLQ_SHIFT
nextChunk |= VLQ_CONTINUATION_BIT <span class="hljs-keyword">if</span> valueToEncode
answer += @encodeBase64 nextChunk
answer</pre></div></div>
</li>
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<h2 id="regular-base64-encoding">Regular Base64 Encoding</h2>
</div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre> BASE64_CHARS = <span class="hljs-string">'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'</span>
encodeBase64: <span class="hljs-function"><span class="hljs-params">(value)</span> -&gt;</span>
BASE64_CHARS[value] <span class="hljs-keyword">or</span> <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"Cannot Base64 encode value: <span class="hljs-subst">#{value}</span>"</span></pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Our API for source maps is just the <code>SourceMap</code> class.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">module</span>.exports = SourceMap</pre></div></div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,457 +0,0 @@
/**
* CoffeeScript Compiler v2.0.0-alpha1
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(q,ra,ua){if(ua.get||ua.set)throw new TypeError("ES3 does not support getters and setters.");q!=Array.prototype&&q!=Object.prototype&&(q[ra]=ua.value)};$jscomp.getGlobal=function(q){return"undefined"!=typeof window&&window===q?q:"undefined"!=typeof global&&null!=global?global:q};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(q){return $jscomp.SYMBOL_PREFIX+(q||"")+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var q=$jscomp.global.Symbol.iterator;q||(q=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[q]&&$jscomp.defineProperty(Array.prototype,q,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.arrayIterator=function(q){var ra=0;return $jscomp.iteratorPrototype(function(){return ra<q.length?{done:!1,value:q[ra++]}:{done:!0}})};$jscomp.iteratorPrototype=function(q){$jscomp.initSymbolIterator();q={next:q};q[$jscomp.global.Symbol.iterator]=function(){return this};return q};$jscomp.makeIterator=function(q){$jscomp.initSymbolIterator();var ra=q[Symbol.iterator];return ra?ra.call(q):$jscomp.arrayIterator(q)};
$jscomp.arrayFromIterator=function(q){for(var ra,ua=[];!(ra=q.next()).done;)ua.push(ra.value);return ua};$jscomp.arrayFromIterable=function(q){return q instanceof Array?q:$jscomp.arrayFromIterator($jscomp.makeIterator(q))};$jscomp.inherits=function(q,ra){function ua(){}ua.prototype=ra.prototype;q.prototype=new ua;q.prototype.constructor=q;for(var k in ra)if(Object.defineProperties){var xa=Object.getOwnPropertyDescriptor(ra,k);xa&&Object.defineProperty(q,k,xa)}else q[k]=ra[k]};
$jscomp.checkStringArgs=function(q,ra,ua){if(null==q)throw new TypeError("The 'this' value for String.prototype."+ua+" must not be null or undefined");if(ra instanceof RegExp)throw new TypeError("First argument to String.prototype."+ua+" must not be a regular expression");return q+""};
$jscomp.polyfill=function(q,ra,ua,k){if(ra){ua=$jscomp.global;q=q.split(".");for(k=0;k<q.length-1;k++){var xa=q[k];xa in ua||(ua[xa]={});ua=ua[xa]}q=q[q.length-1];k=ua[q];ra=ra(k);ra!=k&&null!=ra&&$jscomp.defineProperty(ua,q,{configurable:!0,writable:!0,value:ra})}};
$jscomp.polyfill("String.prototype.repeat",function(q){return q?q:function(q){var ua=$jscomp.checkStringArgs(this,null,"repeat");if(0>q||1342177279<q)throw new RangeError("Invalid count value");q|=0;for(var k="";q;)if(q&1&&(k+=ua),q>>>=1)ua+=ua;return k}},"es6-impl","es3");$jscomp.findInternal=function(q,ra,ua){q instanceof String&&(q=String(q));for(var k=q.length,xa=0;xa<k;xa++){var sa=q[xa];if(ra.call(ua,sa,xa,q))return{i:xa,v:sa}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(q){return q?q:function(q,ua){return $jscomp.findInternal(this,q,ua).v}},"es6-impl","es3");$jscomp.array=$jscomp.array||{};$jscomp.iteratorFromArray=function(q,ra){$jscomp.initSymbolIterator();q instanceof String&&(q+="");var ua=0,k={next:function(){if(ua<q.length){var xa=ua++;return{value:ra(xa,q[xa]),done:!1}}k.next=function(){return{done:!0,value:void 0}};return k.next()}};k[Symbol.iterator]=function(){return k};return k};
$jscomp.polyfill("Array.prototype.keys",function(q){return q?q:function(){return $jscomp.iteratorFromArray(this,function(q){return q})}},"es6-impl","es3");
(function(q){var ra=function(){function q(k){return q[k]}q["../../package.json"]={name:"coffeescript",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"2.0.0-alpha1",license:"MIT",engines:{node:"\x3e\x3d7.2.1"},directories:{lib:"./lib/coffeescript"},main:"./lib/coffeescript/coffeescript",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],preferGlobal:!0,scripts:{test:"node ./bin/cake test",
"test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{docco:"~0.7.0","google-closure-compiler-js":"^20170124.0.0","highlight.js":"~9.9.0",jison:"\x3e\x3d0.4.17",marked:"^0.3.6",underscore:"~1.8.3"},dependencies:{marked:"~0.3.6"}};q.marked=function(){var k={},q={exports:k};(function(){function sa(a){this.tokens=[];this.tokens.links=
{};this.options=a||D.defaults;this.rules=w.normal;this.options.gfm&&(this.rules=this.options.tables?w.tables:w.gfm)}function ha(l,c){this.options=c||D.defaults;this.links=l;this.rules=z.normal;this.renderer=this.options.renderer||new a;this.renderer.options=this.options;if(!this.links)throw Error("Tokens array requires a `links` property.");this.options.gfm?this.rules=this.options.breaks?z.breaks:z.gfm:this.options.pedantic&&(this.rules=z.pedantic)}function a(a){this.options=a||{}}function g(l){this.tokens=
[];this.token=null;this.options=l||D.defaults;this.options.renderer=this.options.renderer||new a;this.renderer=this.options.renderer;this.renderer.options=this.options}function ta(a,c){return a.replace(c?/&/g:/&(?!#?\w+;)/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#39;")}function m(a){return a.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(a,l){l=l.toLowerCase();return"colon"===l?":":"#"===l.charAt(0)?"x"===l.charAt(1)?String.fromCharCode(parseInt(l.substring(2),
16)):String.fromCharCode(+l.substring(1)):""})}function c(a,c){a=a.source;c=c||"";return function B(l,e){if(!l)return new RegExp(a,c);e=e.source||e;e=e.replace(/(^|[^\[])\^/g,"$1");a=a.replace(l,e);return B}}function e(){}function y(a){for(var l=1,c,e;l<arguments.length;l++)for(e in c=arguments[l],c)Object.prototype.hasOwnProperty.call(c,e)&&(a[e]=c[e]);return a}function D(a,c,e){if(e||"function"===typeof c){e||(e=c,c=null);c=y({},D.defaults,c||{});var l=c.highlight,E,p,A=0;try{E=sa.lex(a,c)}catch(n){return e(n)}p=
E.length;var h=function(a){if(a)return c.highlight=l,e(a);var h;try{h=g.parse(E,c)}catch(t){a=t}c.highlight=l;return a?e(a):e(null,h)};if(!l||3>l.length)return h();delete c.highlight;if(!p)return h();for(;A<E.length;A++)(function(a){return"code"!==a.type?--p||h():l(a.text,a.lang,function(l,c){if(l)return h(l);if(null==c||c===a.text)return--p||h();a.text=c;a.escaped=!0;--p||h()})})(E[A])}else try{return c&&(c=y({},D.defaults,c)),g.parse(sa.lex(a,c),c)}catch(n){n.message+="\nPlease report this to https://github.com/chjj/marked.";
if((c||D.defaults).silent)return"\x3cp\x3eAn error occured:\x3c/p\x3e\x3cpre\x3e"+ta(n.message+"",!0)+"\x3c/pre\x3e";throw n;}}var w={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:e,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:e,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:e,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};w.item=c(w.item,"gm")(/bull/g,w.bullet)();w.list=c(w.list)(/bull/g,w.bullet)("hr","\\n+(?\x3d\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?\x3d"+w.def.source+")")();w.blockquote=c(w.blockquote)("def",w.def)();w._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";
w.html=c(w.html)("comment",/\x3c!--[\s\S]*?--\x3e/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,w._tag)();w.paragraph=c(w.paragraph)("hr",w.hr)("heading",w.heading)("lheading",w.lheading)("blockquote",w.blockquote)("tag","\x3c"+w._tag)("def",w.def)();w.normal=y({},w);w.gfm=y({},w.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});w.gfm.paragraph=c(w.paragraph)("(?!",
"(?!"+w.gfm.fences.source.replace("\\1","\\2")+"|"+w.list.source.replace("\\1","\\3")+"|")();w.tables=y({},w.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});sa.rules=w;sa.lex=function(a,c){return(new sa(c)).lex(a)};sa.prototype.lex=function(a){a=a.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(a,!0)};sa.prototype.token=function(a,c,e){a=
a.replace(/^ +$/gm,"");for(var l,g,p,E,h,n,u;a;){if(p=this.rules.newline.exec(a))a=a.substring(p[0].length),1<p[0].length&&this.tokens.push({type:"space"});if(p=this.rules.code.exec(a))a=a.substring(p[0].length),p=p[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?p:p.replace(/\n+$/,"")});else if(p=this.rules.fences.exec(a))a=a.substring(p[0].length),this.tokens.push({type:"code",lang:p[2],text:p[3]||""});else if(p=this.rules.heading.exec(a))a=a.substring(p[0].length),
this.tokens.push({type:"heading",depth:p[1].length,text:p[2]});else if(c&&(p=this.rules.nptable.exec(a))){a=a.substring(p[0].length);h={type:"table",header:p[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3].replace(/\n$/,"").split("\n")};for(n=0;n<h.align.length;n++)/^ *-+: *$/.test(h.align[n])?h.align[n]="right":/^ *:-+: *$/.test(h.align[n])?h.align[n]="center":/^ *:-+ *$/.test(h.align[n])?h.align[n]="left":h.align[n]=null;for(n=0;n<h.cells.length;n++)h.cells[n]=
h.cells[n].split(/ *\| */);this.tokens.push(h)}else if(p=this.rules.lheading.exec(a))a=a.substring(p[0].length),this.tokens.push({type:"heading",depth:"\x3d"===p[2]?1:2,text:p[1]});else if(p=this.rules.hr.exec(a))a=a.substring(p[0].length),this.tokens.push({type:"hr"});else if(p=this.rules.blockquote.exec(a))a=a.substring(p[0].length),this.tokens.push({type:"blockquote_start"}),p=p[0].replace(/^ *> ?/gm,""),this.token(p,c,!0),this.tokens.push({type:"blockquote_end"});else if(p=this.rules.list.exec(a)){a=
a.substring(p[0].length);E=p[2];this.tokens.push({type:"list_start",ordered:1<E.length});p=p[0].match(this.rules.item);l=!1;u=p.length;for(n=0;n<u;n++)h=p[n],g=h.length,h=h.replace(/^ *([*+-]|\d+\.) +/,""),~h.indexOf("\n ")&&(g-=h.length,h=this.options.pedantic?h.replace(/^ {1,4}/gm,""):h.replace(new RegExp("^ {1,"+g+"}","gm"),"")),this.options.smartLists&&n!==u-1&&(g=w.bullet.exec(p[n+1])[0],E===g||1<E.length&&1<g.length||(a=p.slice(n+1).join("\n")+a,n=u-1)),g=l||/\n\n(?!\s*$)/.test(h),n!==u-1&&
(l="\n"===h.charAt(h.length-1),g||(g=l)),this.tokens.push({type:g?"loose_item_start":"list_item_start"}),this.token(h,!1,e),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(p=this.rules.html.exec(a))a=a.substring(p[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===p[1]||"script"===p[1]||"style"===p[1]),text:p[0]});else if(!e&&c&&(p=this.rules.def.exec(a)))a=a.substring(p[0].length),this.tokens.links[p[1].toLowerCase()]=
{href:p[2],title:p[3]};else if(c&&(p=this.rules.table.exec(a))){a=a.substring(p[0].length);h={type:"table",header:p[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(n=0;n<h.align.length;n++)/^ *-+: *$/.test(h.align[n])?h.align[n]="right":/^ *:-+: *$/.test(h.align[n])?h.align[n]="center":/^ *:-+ *$/.test(h.align[n])?h.align[n]="left":h.align[n]=null;for(n=0;n<h.cells.length;n++)h.cells[n]=h.cells[n].replace(/^ *\| *| *\| *$/g,
"").split(/ *\| */);this.tokens.push(h)}else if(c&&(p=this.rules.paragraph.exec(a)))a=a.substring(p[0].length),this.tokens.push({type:"paragraph",text:"\n"===p[1].charAt(p[1].length-1)?p[1].slice(0,-1):p[1]});else if(p=this.rules.text.exec(a))a=a.substring(p[0].length),this.tokens.push({type:"text",text:p[0]});else if(a)throw Error("Infinite loop on byte: "+a.charCodeAt(0));}return this.tokens};var z={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:e,tag:/^\x3c!--[\s\S]*?--\x3e|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:e,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/,_inside:/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,_href:/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/};z.link=c(z.link)("inside",z._inside)("href",z._href)();z.reflink=
c(z.reflink)("inside",z._inside)();z.normal=y({},z);z.pedantic=y({},z.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});z.gfm=y({},z.normal,{escape:c(z.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(z.text)("]|","~]|")("|","|https?://|")()});z.breaks=y({},z.gfm,{br:c(z.br)("{2,}","*")(),text:c(z.gfm.text)("{2,}","*")()});ha.rules=z;ha.output=function(a,
c,e){return(new ha(c,e)).output(a)};ha.prototype.output=function(a){for(var c="",e,l;a;)if(l=this.rules.escape.exec(a))a=a.substring(l[0].length),c+=l[1];else if(l=this.rules.autolink.exec(a))a=a.substring(l[0].length),"@"===l[2]?(e=":"===l[1].charAt(6)?this.mangle(l[1].substring(7)):this.mangle(l[1]),l=this.mangle("mailto:")+e):l=e=ta(l[1]),c+=this.renderer.link(l,null,e);else if(!this.inLink&&(l=this.rules.url.exec(a)))a=a.substring(l[0].length),l=e=ta(l[1]),c+=this.renderer.link(l,null,e);else if(l=
this.rules.tag.exec(a))!this.inLink&&/^<a /i.test(l[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(l[0])&&(this.inLink=!1),a=a.substring(l[0].length),c+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(l[0]):ta(l[0]):l[0];else if(l=this.rules.link.exec(a))a=a.substring(l[0].length),this.inLink=!0,c+=this.outputLink(l,{href:l[2],title:l[3]}),this.inLink=!1;else if((l=this.rules.reflink.exec(a))||(l=this.rules.nolink.exec(a)))a=a.substring(l[0].length),e=(l[2]||l[1]).replace(/\s+/g,
" "),(e=this.links[e.toLowerCase()])&&e.href?(this.inLink=!0,c+=this.outputLink(l,e),this.inLink=!1):(c+=l[0].charAt(0),a=l[0].substring(1)+a);else if(l=this.rules.strong.exec(a))a=a.substring(l[0].length),c+=this.renderer.strong(this.output(l[2]||l[1]));else if(l=this.rules.em.exec(a))a=a.substring(l[0].length),c+=this.renderer.em(this.output(l[2]||l[1]));else if(l=this.rules.code.exec(a))a=a.substring(l[0].length),c+=this.renderer.codespan(ta(l[2],!0));else if(l=this.rules.br.exec(a))a=a.substring(l[0].length),
c+=this.renderer.br();else if(l=this.rules.del.exec(a))a=a.substring(l[0].length),c+=this.renderer.del(this.output(l[1]));else if(l=this.rules.text.exec(a))a=a.substring(l[0].length),c+=this.renderer.text(ta(this.smartypants(l[0])));else if(a)throw Error("Infinite loop on byte: "+a.charCodeAt(0));return c};ha.prototype.outputLink=function(a,c){var l=ta(c.href);c=c.title?ta(c.title):null;return"!"!==a[0].charAt(0)?this.renderer.link(l,c,this.output(a[1])):this.renderer.image(l,c,ta(a[1]))};ha.prototype.smartypants=
function(a){return this.options.smartypants?a.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026"):a};ha.prototype.mangle=function(a){if(!this.options.mangle)return a;for(var c="",l=a.length,e=0,g;e<l;e++)g=a.charCodeAt(e),.5<Math.random()&&(g="x"+g.toString(16)),c+="\x26#"+g+";";return c};a.prototype.code=function(a,c,e){if(this.options.highlight){var l=
this.options.highlight(a,c);null!=l&&l!==a&&(e=!0,a=l)}return c?'\x3cpre\x3e\x3ccode class\x3d"'+this.options.langPrefix+ta(c,!0)+'"\x3e'+(e?a:ta(a,!0))+"\n\x3c/code\x3e\x3c/pre\x3e\n":"\x3cpre\x3e\x3ccode\x3e"+(e?a:ta(a,!0))+"\n\x3c/code\x3e\x3c/pre\x3e"};a.prototype.blockquote=function(a){return"\x3cblockquote\x3e\n"+a+"\x3c/blockquote\x3e\n"};a.prototype.html=function(a){return a};a.prototype.heading=function(a,c,e){return"\x3ch"+c+' id\x3d"'+this.options.headerPrefix+e.toLowerCase().replace(/[^\w]+/g,
"-")+'"\x3e'+a+"\x3c/h"+c+"\x3e\n"};a.prototype.hr=function(){return this.options.xhtml?"\x3chr/\x3e\n":"\x3chr\x3e\n"};a.prototype.list=function(a,c){c=c?"ol":"ul";return"\x3c"+c+"\x3e\n"+a+"\x3c/"+c+"\x3e\n"};a.prototype.listitem=function(a){return"\x3cli\x3e"+a+"\x3c/li\x3e\n"};a.prototype.paragraph=function(a){return"\x3cp\x3e"+a+"\x3c/p\x3e\n"};a.prototype.table=function(a,c){return"\x3ctable\x3e\n\x3cthead\x3e\n"+a+"\x3c/thead\x3e\n\x3ctbody\x3e\n"+c+"\x3c/tbody\x3e\n\x3c/table\x3e\n"};a.prototype.tablerow=
function(a){return"\x3ctr\x3e\n"+a+"\x3c/tr\x3e\n"};a.prototype.tablecell=function(a,c){var e=c.header?"th":"td";return(c.align?"\x3c"+e+' style\x3d"text-align:'+c.align+'"\x3e':"\x3c"+e+"\x3e")+a+"\x3c/"+e+"\x3e\n"};a.prototype.strong=function(a){return"\x3cstrong\x3e"+a+"\x3c/strong\x3e"};a.prototype.em=function(a){return"\x3cem\x3e"+a+"\x3c/em\x3e"};a.prototype.codespan=function(a){return"\x3ccode\x3e"+a+"\x3c/code\x3e"};a.prototype.br=function(){return this.options.xhtml?"\x3cbr/\x3e":"\x3cbr\x3e"};
a.prototype.del=function(a){return"\x3cdel\x3e"+a+"\x3c/del\x3e"};a.prototype.link=function(a,c,e){if(this.options.sanitize){try{var l=decodeURIComponent(m(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(J){return""}if(0===l.indexOf("javascript:")||0===l.indexOf("vbscript:"))return""}a='\x3ca href\x3d"'+a+'"';c&&(a+=' title\x3d"'+c+'"');return a+("\x3e"+e+"\x3c/a\x3e")};a.prototype.image=function(a,c,e){a='\x3cimg src\x3d"'+a+'" alt\x3d"'+e+'"';c&&(a+=' title\x3d"'+c+'"');return a+=this.options.xhtml?
"/\x3e":"\x3e"};a.prototype.text=function(a){return a};g.parse=function(a,c,e){return(new g(c,e)).parse(a)};g.prototype.parse=function(a){this.inline=new ha(a.links,this.options,this.renderer);this.tokens=a.reverse();for(a="";this.next();)a+=this.tok();return a};g.prototype.next=function(){return this.token=this.tokens.pop()};g.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};g.prototype.parseText=function(){for(var a=this.token.text;"text"===this.peek().type;)a+="\n"+this.next().text;
return this.inline.output(a)};g.prototype.tok=function(){switch(this.token.type){case "space":return"";case "hr":return this.renderer.hr();case "heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case "code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case "table":var a="",c="",e,g,y,p;y="";for(e=0;e<this.token.header.length;e++)y+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,
align:this.token.align[e]});a+=this.renderer.tablerow(y);for(e=0;e<this.token.cells.length;e++){g=this.token.cells[e];y="";for(p=0;p<g.length;p++)y+=this.renderer.tablecell(this.inline.output(g[p]),{header:!1,align:this.token.align[p]});c+=this.renderer.tablerow(y)}return this.renderer.table(a,c);case "blockquote_start":for(c="";"blockquote_end"!==this.next().type;)c+=this.tok();return this.renderer.blockquote(c);case "list_start":c="";for(a=this.token.ordered;"list_end"!==this.next().type;)c+=this.tok();
return this.renderer.list(c,a);case "list_item_start":for(c="";"list_item_end"!==this.next().type;)c+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(c);case "loose_item_start":for(c="";"list_item_end"!==this.next().type;)c+=this.tok();return this.renderer.listitem(c);case "html":return c=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text),this.renderer.html(c);case "paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));
case "text":return this.renderer.paragraph(this.parseText())}};e.exec=e;D.options=D.setOptions=function(a){y(D.defaults,a);return D};D.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new a,xhtml:!1};D.Parser=g;D.parser=g.parse;D.Renderer=a;D.Lexer=sa;D.lexer=sa.lex;D.InlineLexer=ha;D.inlineLexer=ha.output;D.parse=D;"undefined"!==typeof q&&"object"===typeof k?q.exports=
D:"function"===typeof define&&define.amd?define(function(){return D}):this.marked=D}).call(function(){return this||("undefined"!==typeof window?window:global)}());return q.exports}();q["./helpers"]=function(){var k={};(function(){var xa,sa,ha,a,g,ta,m;a=q("marked");k.starts=function(a,e,g){return e===a.substr(g,e.length)};k.ends=function(a,e,g){var c;c=e.length;return e===a.substr(a.length-c-(g||0),c)};k.repeat=ta=function(a,e){var c;for(c="";0<e;)e&1&&(c+=a),e>>>=1,a+=a;return c};k.compact=function(a){var c,
g,m,k;k=[];c=0;for(m=a.length;c<m;c++)(g=a[c])&&k.push(g);return k};k.count=function(a,e){var c,g;c=g=0;if(!e.length)return 1/0;for(;g=1+a.indexOf(e,g);)c++;return c};k.merge=function(a,e){return sa(sa({},a),e)};sa=k.extend=function(a,e){var c,g;for(c in e)g=e[c],a[c]=g;return a};k.flatten=ha=function(a){var c,g,m,k;g=[];m=0;for(k=a.length;m<k;m++)c=a[m],"[object Array]"===Object.prototype.toString.call(c)?g=g.concat(ha(c)):g.push(c);return g};k.del=function(a,e){var c;c=a[e];delete a[e];return c};
k.some=null!=(g=Array.prototype.some)?g:function(a){var c,g,m;g=0;for(m=this.length;g<m;g++)if(c=this[g],a(c))return!0;return!1};k.invertLiterate=function(c){var e,g,m,k,z;for(e=function(){return""+Math.random()*Date.now()};void 0===z||-1!==c.indexOf(z);)z=e();c=c.replace("\t",z);e="";k=a.lexer(c,{});c=0;for(m=k.length;c<m;c++)g=k[c],"code"===g.type&&(e+=g.text+"\n");e.replace(z,"\t");return e};xa=function(a,e){return e?{first_line:a.first_line,first_column:a.first_column,last_line:e.last_line,last_column:e.last_column}:
a};k.addLocationDataFn=function(a,e){return function(c){"object"===typeof c&&c.updateLocationDataIfMissing&&c.updateLocationDataIfMissing(xa(a,e));return c}};k.locationDataToString=function(a){var c;"2"in a&&"first_line"in a[2]?c=a[2]:"first_line"in a&&(c=a);return c?c.first_line+1+":"+(c.first_column+1)+"-"+(c.last_line+1+":"+(c.last_column+1)):"No location data"};k.baseFileName=function(a,e,g){e=void 0===e?!1:e;a=a.split((void 0===g?0:g)?/\\|\//:/\//);a=a[a.length-1];if(!(e&&0<=a.indexOf(".")))return a;
a=a.split(".");a.pop();"coffee"===a[a.length-1]&&1<a.length&&a.pop();return a.join(".")};k.isCoffee=function(a){return/\.((lit)?coffee|coffee\.md)$/.test(a)};k.isLiterate=function(a){return/\.(litcoffee|coffee\.md)$/.test(a)};k.throwSyntaxError=function(a,e){a=new SyntaxError(a);a.location=e;a.toString=m;a.stack=a.toString();throw a;};k.updateSyntaxError=function(a,e,g){a.toString===m&&(a.code||(a.code=e),a.filename||(a.filename=g),a.stack=a.toString());return a};m=function(){var a,e,g,m,k,z,l,E,
A,B;if(!this.code||!this.location)return Error.prototype.toString.call(this);a=this.location;z=a.first_line;k=a.first_column;g=a.last_line;l=a.last_column;null==g&&(g=z);null==l&&(l=k);m=this.filename||"[stdin]";a=this.code.split("\n")[z];g=z===g?l+1:a.length;l=a.slice(0,k).replace(/[^\s]/g," ")+ta("^",g-k);"undefined"!==typeof process&&null!==process&&(e=(null!=(E=process.stdout)?E.isTTY:void 0)&&!(null!=(A=process.env)&&A.NODE_DISABLE_COLORS));if(null!=(B=this.colorful)?B:e)e=function(a){return"\u001b[1;31m"+
a+"\u001b[0m"},a=a.slice(0,k)+e(a.slice(k,g))+a.slice(g),l=e(l);return m+":"+(z+1)+":"+(k+1)+": error: "+this.message+"\n"+a+"\n"+l};k.nameWhitespaceCharacter=function(a){switch(a){case " ":return"space";case "\n":return"newline";case "\r":return"carriage return";case "\t":return"tab";default:return a}}}).call(this);return k}();q["./rewriter"]=function(){var k={};(function(){var q,sa,ha,a,g,ta,m,c,e,y,D,w,z,l,E,A,B,J,p=[].indexOf||function(a){for(var c=0,e=this.length;c<e;c++)if(c in this&&this[c]===
a)return c;return-1};l=function(a,c,e){a=[a,c];a.generated=!0;e&&(a.origin=e);return a};k.Rewriter=function(){var k=function(){};k.prototype.rewrite=function(a){this.tokens=a;this.removeLeadingNewlines();this.closeOpenCalls();this.closeOpenIndexes();this.normalizeLines();this.tagPostfixConditionals();this.addImplicitBracesAndParens();this.addLocationDataToGeneratedTokens();this.fixOutdentLocationData();return this.tokens};k.prototype.scanTokens=function(a){var c,h,e;e=this.tokens;for(c=0;h=e[c];)c+=
a.call(this,h,c,e);return!0};k.prototype.detectEnd=function(c,e,u){var h,n,l,r,k;k=this.tokens;for(h=0;r=k[c];){if(0===h&&e.call(this,r,c))return u.call(this,r,c);if(!r||0>h)return u.call(this,r,c-1);(n=r[0],0<=p.call(g,n))?h+=1:(l=r[0],0<=p.call(a,l))&&--h;c+=1}return c-1};k.prototype.removeLeadingNewlines=function(){var a,c,e,g,l;g=this.tokens;a=c=0;for(e=g.length;c<e&&(l=g[a][0],"TERMINATOR"===l);a=++c);if(a)return this.tokens.splice(0,a)};k.prototype.closeOpenCalls=function(){var a,c;c=function(a,
c){var h;return")"===(h=a[0])||"CALL_END"===h||"OUTDENT"===a[0]&&")"===this.tag(c-1)};a=function(a,c){return this.tokens["OUTDENT"===a[0]?c-1:c][0]="CALL_END"};return this.scanTokens(function(h,e){"CALL_START"===h[0]&&this.detectEnd(e+1,c,a);return 1})};k.prototype.closeOpenIndexes=function(){var a,c;c=function(a,c){var h;return"]"===(h=a[0])||"INDEX_END"===h};a=function(a,c){return a[0]="INDEX_END"};return this.scanTokens(function(h,e){"INDEX_START"===h[0]&&this.detectEnd(e+1,c,a);return 1})};k.prototype.indexOfTag=
function(a,c){for(var h=[],e=1;e<arguments.length;++e)h[e-1]=arguments[e];var g,n,l,k;g=n=e=0;for(l=h.length;0<=l?n<l:n>l;g=0<=l?++n:--n){for(;"HERECOMMENT"===this.tag(a+g+e);)e+=2;if(null!=h[g]&&("string"===typeof h[g]&&(h[g]=[h[g]]),k=this.tag(a+g+e),0>p.call(h[g],k)))return-1}return a+g+e-1};k.prototype.looksObjectish=function(c){var e;if(-1<this.indexOfTag(c,"@",null,":")||-1<this.indexOfTag(c,null,":"))return!0;c=this.indexOfTag(c,g);return-1<c&&(e=null,this.detectEnd(c+1,function(c){var e;return e=
c[0],0<=p.call(a,e)},function(a,c){return e=c}),":"===this.tag(e+1))?!0:!1};k.prototype.findTagsBackwards=function(c,e){var h,n,l,k,r,m,y;for(h=[];0<=c&&(h.length||(k=this.tag(c),0>p.call(e,k))&&((r=this.tag(c),0>p.call(g,r))||this.tokens[c].generated)&&(m=this.tag(c),0>p.call(D,m)));)(n=this.tag(c),0<=p.call(a,n))&&h.push(this.tag(c)),(l=this.tag(c),0<=p.call(g,l))&&h.length&&h.pop(),--c;return y=this.tag(c),0<=p.call(e,y)};k.prototype.addImplicitBracesAndParens=function(){var h,n;h=[];n=null;return this.scanTokens(function(u,
t,k){var x,r,H,y,w,A,z,E,q,B,G,C,ha,F,J,S,V,K;K=u[0];B=(G=0<t?k[t-1]:[])[0];q=(t<k.length-1?k[t+1]:[])[0];J=function(){return h[h.length-1]};S=t;H=function(a){return t-S+a};y=function(){var a,c;return null!=(a=J())?null!=(c=a[2])?c.ours:void 0:void 0};w=function(){var a;return y()&&"("===(null!=(a=J())?a[0]:void 0)};z=function(){var a;return y()&&"{"===(null!=(a=J())?a[0]:void 0)};A=function(){var a;return y&&"CONTROL"===(null!=(a=J())?a[0]:void 0)};V=function(a){var c;c=null!=a?a:t;h.push(["(",c,
{ours:!0}]);k.splice(c,0,l("CALL_START","("));if(null==a)return t+=1};x=function(){h.pop();k.splice(t,0,l("CALL_END",")",["","end of input",u[2]]));return t+=1};E=function(a,c){var e;e=null!=a?a:t;h.push(["{",e,{sameLine:!0,startsLine:void 0===c?!0:c,ours:!0}]);c=new String("{");c.generated=!0;k.splice(e,0,l("{",c,u));if(null==a)return t+=1};r=function(a){a=null!=a?a:t;h.pop();k.splice(a,0,l("}","}",u));return t+=1};if(w()&&("IF"===K||"TRY"===K||"FINALLY"===K||"CATCH"===K||"CLASS"===K||"SWITCH"===
K))return h.push(["CONTROL",t,{ours:!0}]),H(1);if("INDENT"===K&&y()){if("\x3d\x3e"!==B&&"-\x3e"!==B&&"["!==B&&"("!==B&&","!==B&&"{"!==B&&"TRY"!==B&&"ELSE"!==B&&"\x3d"!==B)for(;w();)x();A()&&h.pop();h.push([K,t]);return H(1)}if(0<=p.call(g,K))return h.push([K,t]),H(1);if(0<=p.call(a,K)){for(;y();)w()?x():z()?r():h.pop();n=h.pop()}if((0<=p.call(c,K)&&u.spaced||"?"===K&&0<t&&!k[t-1].spaced)&&(0<=p.call(ta,q)||0<=p.call(e,q)&&(null==(C=k[t+1])||!C.spaced)&&(null==(ha=k[t+1])||!ha.newLine)))return"?"===
K&&(K=u[0]="FUNC_EXIST"),V(t+1),H(2);if(0<=p.call(c,K)&&-1<this.indexOfTag(t+1,"INDENT")&&this.looksObjectish(t+2)&&!this.findTagsBackwards(t,"CLASS EXTENDS IF CATCH SWITCH LEADING_WHEN FOR WHILE UNTIL".split(" ")))return V(t+1),h.push(["INDENT",t+2]),H(3);if(":"===K){for(r=function(){var c;switch(!1){case c=this.tag(t-1),0>p.call(a,c):return n[1];case "@"!==this.tag(t-2):return t-2;default:return t-1}}.call(this);"HERECOMMENT"===this.tag(r-2);)r-=2;this.insideForDeclaration="FOR"===q;A=0===r||(F=
this.tag(r-1),0<=p.call(D,F))||k[r-1].newLine;if(J()&&(z=J(),F=z[0],G=z[1],("{"===F||"INDENT"===F&&"{"===this.tag(G-1))&&(A||","===this.tag(r-1)||"{"===this.tag(r-1))))return H(1);E(r,!!A);return H(2)}z()&&0<=p.call(D,K)&&(J()[2].sameLine=!1);E="OUTDENT"===B||G.newLine;if(0<=p.call(m,K)||0<=p.call(sa,K)&&E)for(;y();)if(E=J(),F=E[0],G=E[1],F=E[2],E=F.sameLine,A=F.startsLine,w()&&","!==B)x();else if(z()&&!this.insideForDeclaration&&E&&"TERMINATOR"!==K&&":"!==B)r();else if(!z()||"TERMINATOR"!==K||","===
B||A&&this.looksObjectish(t+1))break;else{if("HERECOMMENT"===q)return H(1);r()}if(!(","!==K||this.looksObjectish(t+1)||!z()||this.insideForDeclaration||"TERMINATOR"===q&&this.looksObjectish(t+2)))for(q="OUTDENT"===q?1:0;z();)r(t+q);return H(1)})};k.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(a,c,e){var h,g,n;if(a[2]||!a.generated&&!a.explicit)return 1;"{"===a[0]&&(h=null!=(n=e[c+1])?n[2]:void 0)?(g=h.first_line,h=h.first_column):(h=null!=(g=e[c-1])?g[2]:void 0)?
(g=h.last_line,h=h.last_column):g=h=0;a[2]={first_line:g,first_column:h,last_line:g,last_column:h};return 1})};k.prototype.fixOutdentLocationData=function(){return this.scanTokens(function(a,c,e){if(!("OUTDENT"===a[0]||a.generated&&"CALL_END"===a[0]||a.generated&&"}"===a[0]))return 1;c=e[c-1][2];a[2]={first_line:c.last_line,first_column:c.last_column,last_line:c.last_line,last_column:c.last_column};return 1})};k.prototype.normalizeLines=function(){var a,c,e,g,l;l=e=g=null;c=function(a,c){var e,g,
h,n;return";"!==a[1]&&(e=a[0],0<=p.call(w,e))&&!("TERMINATOR"===a[0]&&(g=this.tag(c+1),0<=p.call(ha,g)))&&!("ELSE"===a[0]&&"THEN"!==l)&&!!("CATCH"!==(h=a[0])&&"FINALLY"!==h||"-\x3e"!==l&&"\x3d\x3e"!==l)||(n=a[0],0<=p.call(sa,n))&&this.tokens[c-1].newLine};a=function(a,c){return this.tokens.splice(","===this.tag(c-1)?c-1:c,0,g)};return this.scanTokens(function(h,n,k){var t,m,u;h=h[0];if("TERMINATOR"===h){if("ELSE"===this.tag(n+1)&&"OUTDENT"!==this.tag(n-1))return k.splice.apply(k,[].concat([n,1],$jscomp.arrayFromIterable(this.indentation()))),
1;if(t=this.tag(n+1),0<=p.call(ha,t))return k.splice(n,1),0}if("CATCH"===h)for(t=m=1;2>=m;t=++m)if("OUTDENT"===(u=this.tag(n+t))||"TERMINATOR"===u||"FINALLY"===u)return k.splice.apply(k,[].concat([n+t,0],$jscomp.arrayFromIterable(this.indentation()))),2+t;0<=p.call(z,h)&&"INDENT"!==this.tag(n+1)&&("ELSE"!==h||"IF"!==this.tag(n+1))&&(l=h,u=this.indentation(k[n]),e=u[0],g=u[1],"THEN"===l&&(e.fromThen=!0),k.splice(n+1,0,e),this.detectEnd(n+2,c,a),"THEN"===h&&k.splice(n,1));return 1})};k.prototype.tagPostfixConditionals=
function(){var a,c,e;e=null;c=function(a,c){a=a[0];c=this.tokens[c-1][0];return"TERMINATOR"===a||"INDENT"===a&&0>p.call(z,c)};a=function(a,c){if("INDENT"!==a[0]||a.generated&&!a.fromThen)return e[0]="POST_"+e[0]};return this.scanTokens(function(h,g){if("IF"!==h[0])return 1;e=h;this.detectEnd(g+1,c,a);return 1})};k.prototype.indentation=function(a){var c,e;c=["INDENT",2];e=["OUTDENT",2];a?(c.generated=e.generated=!0,c.origin=e.origin=a):c.explicit=e.explicit=!0;return[c,e]};k.prototype.tag=function(a){var c;
return null!=(c=this.tokens[a])?c[0]:void 0};k.prototype.generate=l;return k}();q=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]];k.INVERSES=y={};g=[];a=[];E=0;for(B=q.length;E<B;E++)J=q[E],A=J[0],J=J[1],g.push(y[J]=A),a.push(y[A]=J);ha=["CATCH","THEN","ELSE","FINALLY"].concat(a);c="IDENTIFIER PROPERTY SUPER ) CALL_END ] INDEX_END @ THIS".split(" ");ta="IDENTIFIER PROPERTY NUMBER INFINITY NAN STRING STRING_START REGEX REGEX_START JS NEW PARAM_START CLASS IF TRY SWITCH THIS UNDEFINED NULL BOOL UNARY YIELD AWAIT UNARY_MATH SUPER THROW @ -\x3e \x3d\x3e [ ( { -- ++".split(" ");
e=["+","-"];m="POST_IF FOR WHILE UNTIL WHEN BY LOOP TERMINATOR".split(" ");z="ELSE -\x3e \x3d\x3e TRY FINALLY THEN".split(" ");w="TERMINATOR CATCH FINALLY ELSE OUTDENT LEADING_WHEN".split(" ");D=["TERMINATOR","INDENT","OUTDENT"];sa=[".","?.","::","?::"]}).call(this);return k}();q["./lexer"]=function(){var k={};(function(){var xa,sa,ha,a,g,ta,m,c,e,y,D,w,z,l,E,A,B,J,p,ra,h,n,u,t,H,x,r,W,T,Q,R,M,U,O,P,G,C,Z,F,ca,S,V,K,aa,ba,Y,X,ua,Na,za,la,ma,I,ja,da,oa,ia,ka,pa,ea=[].indexOf||function(a){for(var c=
0,e=this.length;c<e;c++)if(c in this&&this[c]===a)return c;return-1};ia=q("./rewriter");Z=ia.Rewriter;h=ia.INVERSES;ia=q("./helpers");ma=ia.count;ka=ia.repeat;I=ia.invertLiterate;pa=ia.throwSyntaxError;var N=function(){};N.prototype.tokenize=function(a,c){c=void 0===c?{}:c;var e,g,h,qa;this.literate=c.literate;this.outdebt=this.indebt=this.baseIndent=this.indent=0;this.indents=[];this.indentLiteral="";this.ends=[];this.tokens=[];this.exportSpecifierList=this.seenExport=this.seenImport=this.seenFor=
!1;this.chunkLine=c.line||0;this.chunkColumn=c.column||0;a=this.clean(a);for(h=0;this.chunk=a.slice(h);)if(e=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),qa=this.getLineAndColumnFromChunk(e),this.chunkLine=qa[0],this.chunkColumn=qa[1],h+=e,c.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:h};this.closeIndentation();(g=this.ends.pop())&&this.error("missing "+
g.tag,g.origin[2]);return!1===c.rewrite?this.tokens:(new Z).rewrite(this.tokens)};N.prototype.clean=function(a){a.charCodeAt(0)===xa&&(a=a.slice(1));a=a.replace(/\r/g,"").replace(X,"");la.test(a)&&(a="\n"+a,this.chunkLine--);this.literate&&(a=I(a));return a};N.prototype.identifierToken=function(){var c,e,h,l,n,k,p,m,t,r,x;if(!(e=B.exec(this.chunk)))return 0;n=e[0];h=e[1];e=e[2];l=h.length;k=void 0;if("own"===h&&"FOR"===this.tag())return this.token("OWN",h),h.length;if("from"===h&&"YIELD"===this.tag())return this.token("FROM",
h),h.length;if("as"===h&&this.seenImport){if("*"===this.value())this.tokens[this.tokens.length-1][0]="IMPORT_ALL";else if(p=this.value(),0<=ea.call(ta,p))this.tokens[this.tokens.length-1][0]="IDENTIFIER";if("DEFAULT"===(m=this.tag())||"IMPORT_ALL"===m||"IDENTIFIER"===m)return this.token("AS",h),h.length}if("as"===h&&this.seenExport&&"IDENTIFIER"===this.tag())return this.token("AS",h),h.length;if("default"===h&&this.seenExport)return this.token("DEFAULT",h),h.length;p=this.tokens;p=p[p.length-1];x=
e||null!=p&&("."===(t=p[0])||"?."===t||"::"===t||"?::"===t||!p.spaced&&"@"===p[0])?"PROPERTY":"IDENTIFIER";"IDENTIFIER"!==x||!(0<=ea.call(u,h)||0<=ea.call(ta,h))||this.exportSpecifierList&&0<=ea.call(ta,h)?"IDENTIFIER"===x&&this.seenFor&&"from"===h&&ja(p)&&(x="FORFROM",this.seenFor=!1):(x=h.toUpperCase(),"WHEN"===x&&(r=this.tag(),0<=ea.call(H,r))?x="LEADING_WHEN":"FOR"===x?this.seenFor=!0:"UNLESS"===x?x="IF":"IMPORT"===x?this.seenImport=!0:"EXPORT"===x?this.seenExport=!0:0<=ea.call(ua,x)?x="UNARY":
0<=ea.call(G,x)&&("INSTANCEOF"!==x&&this.seenFor?(x="FOR"+x,this.seenFor=!1):(x="RELATION","!"===this.value()&&(k=this.tokens.pop(),h="!"+h))));"IDENTIFIER"===x&&0<=ea.call(C,h)&&this.error("reserved word '"+h+"'",{length:h.length});"PROPERTY"!==x&&(0<=ea.call(a,h)&&(c=h,h=g[h]),x=function(){switch(h){case "!":return"UNARY";case "\x3d\x3d":case "!\x3d":return"COMPARE";case "true":case "false":return"BOOL";case "break":case "continue":case "debugger":return"STATEMENT";case "\x26\x26":case "||":return h;
default:return x}}());t=this.token(x,h,0,l);c&&(t.origin=[x,c,t[2]]);k&&(c=[k[2].first_line,k[2].first_column],t[2].first_line=c[0],t[2].first_column=c[1]);e&&(c=n.lastIndexOf(":"),this.token(":",":",c,e.length));return n.length};N.prototype.numberToken=function(){var a,c,e;if(!(c=Q.exec(this.chunk)))return 0;e=c[0];c=e.length;switch(!1){case !/^0[BOX]/.test(e):this.error("radix prefix in '"+e+"' must be lowercase",{offset:1});break;case !/^(?!0x).*E/.test(e):this.error("exponential notation in '"+
e+"' must be indicated with a lowercase 'e'",{offset:e.indexOf("E")});break;case !/^0\d*[89]/.test(e):this.error("decimal literal '"+e+"' must not be prefixed with '0'",{length:c});break;case !/^0\d+/.test(e):this.error("octal literal '"+e+"' must be prefixed with '0o'",{length:c})}a=function(){switch(e.charAt(1)){case "b":return 2;case "o":return 8;case "x":return 16;default:return null}}();a=null!=a?parseInt(e.slice(2),a):parseFloat(e);this.token(Infinity===a?"INFINITY":"NUMBER",e,0,c);return c};
N.prototype.stringToken=function(){var a=this,c,e,h,g,l,n,k,p,m,u,x,r;m=(ba.exec(this.chunk)||[])[0];if(!m)return 0;this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&(this.tokens[this.tokens.length-1][0]="FROM");h=function(){switch(m){case "'":return aa;case '"':return V;case "'''":return z;case '"""':return D}}();g=3===m.length;h=this.matchWithInterpolations(h,m);r=h.tokens;l=h.index;c=r.length-1;h=m.charAt(0);if(g){k=null;for(g=function(){var a,c,e;e=[];n=a=0;for(c=
r.length;a<c;n=++a)x=r[n],"NEOSTRING"===x[0]&&e.push(x[1]);return e}().join("#{}");e=w.exec(g);)if(e=e[1],null===k||0<(u=e.length)&&u<k.length)k=e;k&&(p=RegExp("\\n"+k,"g"));this.mergeInterpolationTokens(r,{delimiter:h},function(e,h){e=a.formatString(e);p&&(e=e.replace(p,"\n"));0===h&&(e=e.replace(t,""));h===c&&(e=e.replace(Y,""));return e})}else this.mergeInterpolationTokens(r,{delimiter:h},function(e,h){e=a.formatString(e);return e=e.replace(ca,function(a,g){return 0===h&&0===g||h===c&&g+a.length===
e.length?"":" "})});return l};N.prototype.commentToken=function(){var a,c,e;if(!(e=this.chunk.match(m)))return 0;a=e[0];if(c=e[1])(e=y.exec(a))&&this.error("block comments cannot contain "+e[0],{offset:e.index,length:e[0].length}),0<=c.indexOf("\n")&&(c=c.replace(RegExp("\\n"+ka(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",c,0,a.length);return a.length};N.prototype.jsToken=function(){var a,c;if("`"!==this.chunk.charAt(0)||!(a=A.exec(this.chunk)||n.exec(this.chunk)))return 0;c=a[1].replace(/\\+(`|$)/g,
function(a){return a.slice(-Math.ceil(a.length/2))});this.token("JS",c,0,a[0].length);return a[0].length};N.prototype.regexToken=function(){var a,c,e,h,g,n,k,p;switch(!1){case !(c=P.exec(this.chunk)):this.error("regular expressions cannot begin with "+c[2],{offset:c.index+c[1].length});break;case !(c=this.matchWithInterpolations(l,"///")):p=c.tokens;g=c.index;break;case !(c=U.exec(this.chunk)):k=c[0];a=c[1];c=c[2];this.validateEscapes(a,{isRegex:!0,offsetInChunk:1});g=k.length;n=this.tokens;if(n=
n[n.length-1])if(n.spaced&&(e=n[0],0<=ea.call(sa,e))){if(!c||M.test(k))return 0}else if(h=n[0],0<=ea.call(T,h))return 0;c||this.error("missing / (unclosed regex)");break;default:return 0}h=O.exec(this.chunk.slice(g))[0];e=g+h.length;c=this.makeToken("REGEX",null,0,e);switch(!1){case !!za.test(h):this.error("invalid regular expression flags "+h,{offset:g,length:h.length});break;case !(k||1===p.length):null==a&&(a=this.formatHeregex(p[0][1]));this.token("REGEX",""+this.makeDelimitedLiteral(a,{delimiter:"/"})+
h,0,e,c);break;default:this.token("REGEX_START","(",0,0,c),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(p,{delimiter:'"',double:!0},this.formatHeregex),h&&(this.token(",",",",g-1,0),this.token("STRING",'"'+h+'"',g-1,h.length)),this.token(")",")",e-1,0),this.token("REGEX_END",")",e-1,0)}return e};N.prototype.lineToken=function(){var a,c,e,h,g;if(!(c=W.exec(this.chunk)))return 0;c=c[0];this.seenFor=!1;g=c.length-1-c.lastIndexOf("\n");h=this.unfinished();
e=0<g?c.slice(-g):"";if(!/^(.?)\1*$/.exec(e))return this.error("mixed indentation",{offset:c.length}),c.length;a=Math.min(e.length,this.indentLiteral.length);if(e.slice(0,a)!==this.indentLiteral.slice(0,a))return this.error("indentation mismatch",{offset:c.length}),c.length;if(g-this.indebt===this.indent)return h?this.suppressNewlines():this.newlineToken(0),c.length;if(g>this.indent){if(h)return this.indebt=g-this.indent,this.suppressNewlines(),c.length;if(!this.tokens.length)return this.baseIndent=
this.indent=g,this.indentLiteral=e,c.length;a=g-this.indent+this.outdebt;this.token("INDENT",a,c.length-g,g);this.indents.push(a);this.ends.push({tag:"OUTDENT"});this.outdebt=this.indebt=0;this.indent=g;this.indentLiteral=e}else g<this.baseIndent?this.error("missing indentation",{offset:c.length}):(this.indebt=0,this.outdentToken(this.indent-g,h,c.length));return c.length};N.prototype.outdentToken=function(a,c,e){var h,g,n,l;for(h=this.indent-a;0<a;)(n=this.indents[this.indents.length-1])?n===this.outdebt?
(a-=this.outdebt,this.outdebt=0):n<this.outdebt?(this.outdebt-=n,a-=n):(g=this.indents.pop()+this.outdebt,e&&(l=this.chunk[e],0<=ea.call(J,l))&&(h-=g-a,a=g),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",a,0,e),a-=g):a=0;g&&(this.outdebt-=a);for(;";"===this.value();)this.tokens.pop();"TERMINATOR"===this.tag()||c||this.token("TERMINATOR","\n",e,0);this.indent=h;this.indentLiteral=this.indentLiteral.slice(0,h);return this};N.prototype.whitespaceToken=function(){var a,c;if(!(a=la.exec(this.chunk))&&
"\n"!==this.chunk.charAt(0))return 0;c=this.tokens;(c=c[c.length-1])&&(c[a?"spaced":"newLine"]=!0);return a?a[0].length:0};N.prototype.newlineToken=function(a){for(;";"===this.value();)this.tokens.pop();"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",a,0);return this};N.prototype.suppressNewlines=function(){"\\"===this.value()&&this.tokens.pop();return this};N.prototype.literalToken=function(){var a,g,n,l,k,m,t,u;(a=R.exec(this.chunk))?(a=a[0],ha.test(a)&&this.tagParameters()):a=this.chunk.charAt(0);
u=a;l=this.tokens;if((l=l[l.length-1])&&0<=ea.call([].concat(["\x3d"],$jscomp.arrayFromIterable(e)),a)&&(t=!1,"\x3d"!==a||"||"!==(n=l[1])&&"\x26\x26"!==n||l.spaced||(l[0]="COMPOUND_ASSIGN",l[1]+="\x3d",l=this.tokens[this.tokens.length-2],t=!0),l&&"PROPERTY"!==l[0]&&(n=null!=(g=l.origin)?g:l,(g=da(l[1],n[1]))&&this.error(g,n[2])),t))return a.length;"{"===a&&"EXPORT"===(null!=l?l[0]:void 0)?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===a&&(this.exportSpecifierList=!1);if(";"===a)this.seenFor=
this.seenImport=this.seenExport=!1,u="TERMINATOR";else if("*"===a&&"EXPORT"===l[0])u="EXPORT_ALL";else if(0<=ea.call(r,a))u="MATH";else if(0<=ea.call(c,a))u="COMPARE";else if(0<=ea.call(e,a))u="COMPOUND_ASSIGN";else if(0<=ea.call(ua,a))u="UNARY";else if(0<=ea.call(Na,a))u="UNARY_MATH";else if(0<=ea.call(F,a))u="SHIFT";else if("?"===a&&null!=l&&l.spaced)u="BIN?";else if(l&&!l.spaced)if("("===a&&(k=l[0],0<=ea.call(sa,k)))"?"===l[0]&&(l[0]="FUNC_EXIST"),u="CALL_START";else if("["===a&&(m=l[0],0<=ea.call(p,
m)))switch(u="INDEX_START",l[0]){case "?":l[0]="INDEX_SOAK"}k=this.makeToken(u,a);switch(a){case "(":case "{":case "[":this.ends.push({tag:h[a],origin:k});break;case ")":case "}":case "]":this.pair(a)}this.tokens.push(k);return a.length};N.prototype.tagParameters=function(){var a,c,e,h;if(")"!==this.tag())return this;c=[];h=this.tokens;a=h.length;for(h[--a][0]="PARAM_END";e=h[--a];)switch(e[0]){case ")":c.push(e);break;case "(":case "CALL_START":if(c.length)c.pop();else return"("===e[0]&&(e[0]="PARAM_START"),
this}return this};N.prototype.closeIndentation=function(){return this.outdentToken(this.indent)};N.prototype.matchWithInterpolations=function(a,c){var e,h,g,l,n,k,p,m;m=[];n=c.length;if(this.chunk.slice(0,n)!==c)return null;for(p=this.chunk.slice(n);;){l=a.exec(p)[0];this.validateEscapes(l,{isRegex:"/"===c.charAt(0),offsetInChunk:n});m.push(this.makeToken("NEOSTRING",l,n));p=p.slice(l.length);n+=l.length;if("#{"!==p.slice(0,2))break;e=this.getLineAndColumnFromChunk(n+1);l=e[0];e=e[1];e=(new N).tokenize(p.slice(1),
{line:l,column:e,untilBalanced:!0});l=e.tokens;h=e.index;h+=1;k=l[0];e=l[l.length-1];k[0]=k[1]="(";e[0]=e[1]=")";e.origin=["","end of interpolation",e[2]];"TERMINATOR"===(null!=(g=l[1])?g[0]:void 0)&&l.splice(1,1);m.push(["TOKENS",l]);p=p.slice(h);n+=h}p.slice(0,c.length)!==c&&this.error("missing "+c,{length:c.length});a=m[0];g=m[m.length-1];a[2].first_column-=c.length;"\n"===g[1].substr(-1)?(g[2].last_line+=1,g[2].last_column=c.length-1):g[2].last_column+=c.length;0===g[1].length&&--g[2].last_column;
return{tokens:m,index:n+c.length}};N.prototype.mergeInterpolationTokens=function(a,c,e){var h,g,l,n,k,p,m,t,u,x,r;1<a.length&&(t=this.token("STRING_START","(",0,0));l=this.tokens.length;n=k=0;for(p=a.length;k<p;n=++k){u=a[n];h=u[0];r=u[1];switch(h){case "TOKENS":if(2===r.length)continue;m=r[0];x=r;break;case "NEOSTRING":h=e(u[1],n);if(0===h.length)if(0===n)g=this.tokens.length;else continue;2===n&&null!=g&&this.tokens.splice(g,2);u[0]="STRING";u[1]=this.makeDelimitedLiteral(h,c);m=u;x=[u]}this.tokens.length>
l&&(n=this.token("+","+"),n[2]={first_line:m[2].first_line,first_column:m[2].first_column,last_line:m[2].first_line,last_column:m[2].first_column});this.tokens.push.apply(this.tokens,[].concat($jscomp.arrayFromIterable(x)))}if(t)return a=a[a.length-1],t.origin=["STRING",null,{first_line:t[2].first_line,first_column:t[2].first_column,last_line:a[2].last_line,last_column:a[2].last_column}],t=this.token("STRING_END",")"),t[2]={first_line:a[2].last_line,first_column:a[2].last_column,last_line:a[2].last_line,
last_column:a[2].last_column}};N.prototype.pair=function(a){var c;c=this.ends;c=c[c.length-1];return a!==(c=null!=c?c.tag:void 0)?("OUTDENT"!==c&&this.error("unmatched "+a),c=this.indents,c=c[c.length-1],this.outdentToken(c,!0),this.pair(a)):this.ends.pop()};N.prototype.getLineAndColumnFromChunk=function(a){var c,e;if(0===a)return[this.chunkLine,this.chunkColumn];e=a>=this.chunk.length?this.chunk:this.chunk.slice(0,+(a-1)+1||9E9);a=ma(e,"\n");c=this.chunkColumn;0<a?(c=e.split("\n"),c=c[c.length-1],
c=c.length):c+=e.length;return[this.chunkLine+a,c]};N.prototype.makeToken=function(a,c,e,h){e=void 0===e?0:e;h=void 0===h?c.length:h;var g,l;g={};l=this.getLineAndColumnFromChunk(e);g.first_line=l[0];g.first_column=l[1];e=this.getLineAndColumnFromChunk(e+(0<h?h-1:0));g.last_line=e[0];g.last_column=e[1];return[a,c,g]};N.prototype.token=function(a,c,e,h,g){a=this.makeToken(a,c,e,h);g&&(a.origin=g);this.tokens.push(a);return a};N.prototype.tag=function(){var a;a=this.tokens;a=a[a.length-1];return null!=
a?a[0]:void 0};N.prototype.value=function(){var a;a=this.tokens;a=a[a.length-1];return null!=a?a[1]:void 0};N.prototype.unfinished=function(){var a;return x.test(this.chunk)||"\\"===(a=this.tag())||"."===a||"?."===a||"?::"===a||"UNARY"===a||"MATH"===a||"UNARY_MATH"===a||"+"===a||"-"===a||"**"===a||"SHIFT"===a||"RELATION"===a||"COMPARE"===a||"\x26"===a||"^"===a||"|"===a||"\x26\x26"===a||"||"===a||"BIN?"===a||"THROW"===a||"EXTENDS"===a};N.prototype.formatString=function(a){return a.replace(K,"$1")};
N.prototype.formatHeregex=function(a){return a.replace(E,"$1$2")};N.prototype.validateEscapes=function(a,c){c=void 0===c?{}:c;var e,h,g,l,n;if(h=ra.exec(a))if(h[0],a=h[1],g=h[2],e=h[3],n=h[4],!c.isRegex||!g||"0"===g.charAt(0))return e="\\"+(g||e||n),this.error((g?"octal escape sequences are not allowed":"invalid escape sequence")+" "+e,{offset:(null!=(l=c.offsetInChunk)?l:0)+h.index+a.length,length:e.length})};N.prototype.makeDelimitedLiteral=function(a,c){c=void 0===c?{}:c;""===a&&"/"===c.delimiter&&
(a="(?:)");a=a.replace(RegExp("(\\\\\\\\)|(\\\\0(?\x3d[1-7]))|\\\\?("+c.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),function(a,e,h,g,l,n,k,p,m){switch(!1){case !e:return c.double?e+e:e;case !h:return"\\x00";case !g:return"\\"+g;case !l:return"\\n";case !n:return"\\r";case !k:return"\\u2028";case !p:return"\\u2029";case !m:return c.double?"\\"+m:m}});return""+c.delimiter+a+c.delimiter};N.prototype.error=function(a,c){c=void 0===c?{}:c;var e,h,g,l,n;c="first_line"in c?c:(l=this.getLineAndColumnFromChunk(null!=
(g=c.offset)?g:0),h=l[0],e=l[1],l,{first_line:h,first_column:e,last_column:e+(null!=(n=c.length)?n:1)-1});return pa(a,c)};k.Lexer=N;da=function(a,c){c=void 0===c?a:c;switch(!1){case 0>ea.call([].concat($jscomp.arrayFromIterable(u),$jscomp.arrayFromIterable(ta)),a):return"keyword '"+c+"' can't be assigned";case 0>ea.call(S,a):return"'"+c+"' can't be assigned";case 0>ea.call(C,a):return"reserved word '"+c+"' can't be assigned";default:return!1}};k.isUnassignable=da;ja=function(a){var c;return"IDENTIFIER"===
a[0]?("from"===a[1]&&(a[1][0]="IDENTIFIER",!0),!0):"FOR"===a[0]?!1:"{"===(c=a[1])||"["===c||","===c||":"===c?!1:!0};u="true false null this new delete typeof in instanceof return throw break continue debugger yield await if else switch for while do try catch finally class extends super import export default".split(" ");ta="undefined Infinity NaN then unless until loop of by when".split(" ");g={and:"\x26\x26",or:"||",is:"\x3d\x3d",isnt:"!\x3d",not:"!",yes:"true",no:"false",on:"true",off:"false"};a=
function(){var a;a=[];for(oa in g)a.push(oa);return a}();ta=ta.concat(a);C="case function var void with const let enum native implements interface package private protected public static".split(" ");S=["arguments","eval"];k.JS_FORBIDDEN=u.concat(C).concat(S);xa=65279;B=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/;Q=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;R=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/;la=/^[^\n\S]+/;m=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;
ha=/^[-=]>/;W=/^(?:\n[^\n\S]*)+/;n=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/;A=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/;ba=/^(?:'''|"""|'|")/;aa=/^(?:[^\\']|\\[\s\S])*/;V=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/;z=/^(?:[^\\']|\\[\s\S]|'(?!''))*/;D=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/;K=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g;ca=/\s*\n\s*/g;w=/\n+([^\n\S]*)(?=\S)/g;U=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;O=/^\w*/;za=/^(?!.*(.).*\1)[imgy]*$/;l=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/;
E=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g;P=/^(\/|\/{3}\s*)(\*)/;M=/^\/=?\s/;y=/\*\//;x=/^\s*(?:,|\??\.(?![.\d])|::)/;ra=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/;t=/^[^\n\S]*\n/;Y=/\n[^\n\S]*$/;X=/\s+$/;e="-\x3d +\x3d /\x3d *\x3d %\x3d ||\x3d \x26\x26\x3d ?\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d ^\x3d |\x3d **\x3d //\x3d %%\x3d".split(" ");ua=["NEW","TYPEOF","DELETE","DO"];Na=["!","~"];F=["\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e"];c=
"\x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d".split(" ");r=["*","/","%","//","%%"];G=["IN","OF","INSTANCEOF"];sa="IDENTIFIER PROPERTY ) ] ? @ THIS SUPER".split(" ");p=sa.concat("NUMBER INFINITY NAN STRING STRING_END REGEX REGEX_END BOOL NULL UNDEFINED } ::".split(" "));T=p.concat(["++","--"]);H=["INDENT","OUTDENT","TERMINATOR"];J=[")","}","]"]}).call(this);return k}();q["./parser"]=function(){var k={},xa={exports:k},sa=function(){function k(){this.yy={}}var a=function(a,v,L,d){L=L||{};for(d=a.length;d--;L[a[d]]=
v);return L},g=[1,22],q=[1,52],m=[1,86],c=[1,82],e=[1,87],y=[1,88],D=[1,84],w=[1,85],z=[1,60],l=[1,62],E=[1,63],A=[1,64],B=[1,65],J=[1,66],p=[1,53],sa=[1,40],h=[1,54],n=[1,34],u=[1,71],t=[1,72],H=[1,33],x=[1,81],r=[1,50],W=[1,55],T=[1,56],Q=[1,69],R=[1,70],M=[1,68],U=[1,45],O=[1,51],P=[1,67],G=[1,76],C=[1,77],Z=[1,78],F=[1,79],ca=[1,49],S=[1,75],V=[1,36],K=[1,37],aa=[1,38],ba=[1,39],Y=[1,41],X=[1,42],xa=[1,89],ua=[1,6,34,44,134],za=[1,104],la=[1,92],ma=[1,91],I=[1,90],ja=[1,93],da=[1,94],oa=[1,95],
ia=[1,96],ka=[1,97],pa=[1,98],ea=[1,99],N=[1,100],qa=[1,101],va=[1,102],na=[1,103],ra=[1,107],wa=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],Qa=[2,170],Xa=[1,113],Ha=[1,118],Ya=[1,114],cb=[1,115],Ra=[1,116],Ia=[1,119],Fa=[1,112],Ea=[1,6,34,44,134,136,138,142,159],Ba=[1,6,33,34,42,43,44,68,73,76,87,88,89,90,91,92,95,99,116,117,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,
177],Sa=[2,98],Ta=[2,77],db=[1,129],Ja=[1,134],Ma=[1,135],Ca=[1,137],ga=[1,141],fa=[1,139],Ua=[1,6,33,34,42,43,44,57,68,73,76,87,88,89,90,91,92,95,99,116,117,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],ya=[2,95],gb=[1,6,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],eb=[2,29],fb=[1,167],Oa=[2,65],hb=[1,175],Za=[1,187],Ga=[1,189],mb=[1,184],La=[1,191],Ka=[1,6,33,34,42,43,44,57,
68,73,76,87,88,89,90,91,92,95,99,101,116,117,118,123,125,134,136,137,138,142,143,159,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178],nb=[2,117],ob=[1,6,33,34,42,43,44,60,68,73,76,87,88,89,90,91,92,95,99,116,117,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],Va=[1,6,33,34,42,43,44,48,60,68,73,76,87,88,89,90,91,92,95,99,116,117,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],ib=[1,
239],pb=[42,43,117],qb=[1,249],b=[1,248],v=[2,75],L=[1,259],d=[6,33,34,68,73],f=[6,33,34,57,68,73,76],Wa=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,162,163,167,168,169,170,171,172,173,174,175,176,177],Da=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,162,163,167,169,170,171,172,173,174,175,176,177],rb=[42,43,87,88,90,91,92,95,116,117],vb=[1,279],Pa=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159],$a=[2,64],wb=[1,291],jb=[1,293],
Hb=[1,298],sb=[1,300],Sb=[2,191],Ib=[1,6,33,34,42,43,44,57,68,73,76,87,88,89,90,91,92,95,99,116,117,118,123,125,134,136,137,138,142,143,149,150,151,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],xb=[1,309],ab=[6,33,34,73,118,123],Tb=[1,6,33,34,42,43,44,57,60,68,73,76,87,88,89,90,91,92,95,99,101,116,117,118,123,125,134,136,137,138,142,143,149,150,151,159,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178],Ub=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,143,159],kb=[1,
6,33,34,44,68,73,76,89,99,118,123,125,134,137,143,159],yb=[149,150,151],zb=[73,149,150,151],Ab=[6,33,99],Vb=[1,321],Aa=[6,33,34,73,99],Wb=[6,33,34,60,73,99],Jb=[6,33,34,57,60,73,99],Xb=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,162,163,169,170,171,172,173,174,175,176,177],lb=[1,6,33,34,44,48,68,73,76,87,88,89,90,91,92,95,99,116,117,118,123,125,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],Yb=[14,30,36,40,42,43,46,47,50,51,52,53,54,55,
63,64,65,66,70,71,86,89,97,100,102,110,120,121,122,128,132,133,136,138,140,142,152,158,160,161,162,163,164,165],Zb=[2,180],bb=[6,33,34],tb=[2,76],$b=[1,336],ac=[1,337],bc=[1,6,33,34,44,68,73,76,89,99,118,123,125,130,131,134,136,137,138,142,143,154,156,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],Bb=[34,154,156],cc=[1,6,34,44,68,73,76,89,99,118,123,125,134,137,143,159],Cb=[1,363],Kb=[1,369],Lb=[1,6,34,44,134,159],ub=[2,90],Db=[1,379],Eb=[1,380],dc=[1,6,33,34,44,68,73,76,89,99,118,123,
125,134,136,137,138,142,143,154,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],Mb=[1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,138,142,143,159],ec=[1,392],fc=[1,393],Nb=[6,33,34,99],gc=[6,33,34,73],Ob=[1,6,33,34,44,68,73,76,89,99,118,123,125,130,134,136,137,138,142,143,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],hc=[33,73],Fb=[1,420],Gb=[1,421],Pb=[1,427],Qb=[1,428],ic={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,
FuncDirective:9,YieldReturn:10,AwaitReturn:11,Return:12,Comment:13,STATEMENT:14,Import:15,Export:16,Value:17,Invocation:18,Code:19,Operation:20,Assign:21,If:22,Try:23,While:24,For:25,Switch:26,Class:27,Throw:28,Yield:29,YIELD:30,FROM:31,Block:32,INDENT:33,OUTDENT:34,Identifier:35,IDENTIFIER:36,Property:37,PROPERTY:38,AlphaNumeric:39,NUMBER:40,String:41,STRING:42,STRING_START:43,STRING_END:44,Regex:45,REGEX:46,REGEX_START:47,REGEX_END:48,Literal:49,JS:50,UNDEFINED:51,NULL:52,BOOL:53,INFINITY:54,NAN:55,
Assignable:56,"\x3d":57,AssignObj:58,ObjAssignable:59,":":60,SimpleObjAssignable:61,ThisProperty:62,RETURN:63,AWAIT:64,HERECOMMENT:65,PARAM_START:66,ParamList:67,PARAM_END:68,FuncGlyph:69,"-\x3e":70,"\x3d\x3e":71,OptComma:72,",":73,Param:74,ParamVar:75,"...":76,Array:77,Object:78,Splat:79,SimpleAssignable:80,Accessor:81,Parenthetical:82,Range:83,This:84,Super:85,SUPER:86,".":87,INDEX_START:88,INDEX_END:89,"?.":90,"::":91,"?::":92,Index:93,IndexValue:94,INDEX_SOAK:95,Slice:96,"{":97,AssignList:98,
"}":99,CLASS:100,EXTENDS:101,IMPORT:102,ImportDefaultSpecifier:103,ImportNamespaceSpecifier:104,ImportSpecifierList:105,ImportSpecifier:106,AS:107,DEFAULT:108,IMPORT_ALL:109,EXPORT:110,ExportSpecifierList:111,EXPORT_ALL:112,ExportSpecifier:113,OptFuncExist:114,Arguments:115,FUNC_EXIST:116,CALL_START:117,CALL_END:118,ArgList:119,THIS:120,"@":121,"[":122,"]":123,RangeDots:124,"..":125,Arg:126,SimpleArgs:127,TRY:128,Catch:129,FINALLY:130,CATCH:131,THROW:132,"(":133,")":134,WhileSource:135,WHILE:136,
WHEN:137,UNTIL:138,Loop:139,LOOP:140,ForBody:141,FOR:142,BY:143,ForStart:144,ForSource:145,ForVariables:146,OWN:147,ForValue:148,FORIN:149,FOROF:150,FORFROM:151,SWITCH:152,Whens:153,ELSE:154,When:155,LEADING_WHEN:156,IfBlock:157,IF:158,POST_IF:159,UNARY:160,UNARY_MATH:161,"-":162,"+":163,"--":164,"++":165,"?":166,MATH:167,"**":168,SHIFT:169,COMPARE:170,"\x26":171,"^":172,"|":173,"\x26\x26":174,"||":175,"BIN?":176,RELATION:177,COMPOUND_ASSIGN:178,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",
14:"STATEMENT",30:"YIELD",31:"FROM",33:"INDENT",34:"OUTDENT",36:"IDENTIFIER",38:"PROPERTY",40:"NUMBER",42:"STRING",43:"STRING_START",44:"STRING_END",46:"REGEX",47:"REGEX_START",48:"REGEX_END",50:"JS",51:"UNDEFINED",52:"NULL",53:"BOOL",54:"INFINITY",55:"NAN",57:"\x3d",60:":",63:"RETURN",64:"AWAIT",65:"HERECOMMENT",66:"PARAM_START",68:"PARAM_END",70:"-\x3e",71:"\x3d\x3e",73:",",76:"...",86:"SUPER",87:".",88:"INDEX_START",89:"INDEX_END",90:"?.",91:"::",92:"?::",95:"INDEX_SOAK",97:"{",99:"}",100:"CLASS",
101:"EXTENDS",102:"IMPORT",107:"AS",108:"DEFAULT",109:"IMPORT_ALL",110:"EXPORT",112:"EXPORT_ALL",116:"FUNC_EXIST",117:"CALL_START",118:"CALL_END",120:"THIS",121:"@",122:"[",123:"]",125:"..",128:"TRY",130:"FINALLY",131:"CATCH",132:"THROW",133:"(",134:")",136:"WHILE",137:"WHEN",138:"UNTIL",140:"LOOP",142:"FOR",143:"BY",147:"OWN",149:"FORIN",150:"FOROF",151:"FORFROM",152:"SWITCH",154:"ELSE",156:"LEADING_WHEN",158:"IF",159:"POST_IF",160:"UNARY",161:"UNARY_MATH",162:"-",163:"+",164:"--",165:"++",166:"?",
167:"MATH",168:"**",169:"SHIFT",170:"COMPARE",171:"\x26",172:"^",173:"|",174:"\x26\x26",175:"||",176:"BIN?",177:"RELATION",178:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[29,1],[29,2],[29,3],[32,2],[32,3],[35,1],[37,1],[39,1],[39,1],[41,1],[41,3],[45,1],[45,3],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[21,3],[21,4],[21,5],[58,
1],[58,3],[58,5],[58,3],[58,5],[58,1],[61,1],[61,1],[61,1],[59,1],[59,1],[12,2],[12,1],[10,3],[10,2],[11,3],[11,2],[13,1],[19,5],[19,2],[69,1],[69,1],[72,0],[72,1],[67,0],[67,1],[67,3],[67,4],[67,6],[74,1],[74,2],[74,3],[74,1],[75,1],[75,1],[75,1],[75,1],[79,2],[80,1],[80,2],[80,2],[80,1],[56,1],[56,1],[56,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[85,3],[85,4],[81,2],[81,2],[81,2],[81,2],[81,1],[81,1],[93,3],[93,2],[94,1],[94,1],[78,4],[98,0],[98,1],[98,3],[98,4],[98,6],[27,1],[27,2],[27,3],[27,
4],[27,2],[27,3],[27,4],[27,5],[15,2],[15,4],[15,4],[15,5],[15,7],[15,6],[15,9],[105,1],[105,3],[105,4],[105,4],[105,6],[106,1],[106,3],[106,1],[106,3],[103,1],[104,3],[16,3],[16,5],[16,2],[16,4],[16,5],[16,6],[16,3],[16,4],[16,7],[111,1],[111,3],[111,4],[111,4],[111,6],[113,1],[113,3],[113,3],[113,1],[18,3],[18,3],[18,3],[18,3],[114,0],[114,1],[115,2],[115,4],[84,1],[84,1],[62,2],[77,2],[77,4],[124,1],[124,1],[83,5],[96,3],[96,2],[96,2],[96,1],[119,1],[119,3],[119,4],[119,4],[119,6],[126,1],[126,
1],[126,1],[127,1],[127,3],[23,2],[23,3],[23,4],[23,5],[129,3],[129,3],[129,2],[28,2],[82,3],[82,5],[135,2],[135,4],[135,2],[135,4],[24,2],[24,2],[24,2],[24,1],[139,2],[139,2],[25,2],[25,2],[25,2],[141,2],[141,4],[141,2],[144,2],[144,3],[148,1],[148,1],[148,1],[148,1],[146,1],[146,3],[145,2],[145,2],[145,4],[145,4],[145,4],[145,6],[145,6],[145,2],[145,4],[26,5],[26,7],[26,4],[26,6],[153,1],[153,2],[155,3],[155,4],[157,3],[157,5],[22,1],[22,3],[22,3],[22,3],[20,2],[20,2],[20,2],[20,2],[20,2],[20,2],
[20,2],[20,2],[20,2],[20,2],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,5],[20,4],[20,3]],performAction:function(a,v,L,d,c,f,b){a=f.length-1;switch(c){case 1:return this.$=d.addLocationDataFn(b[a],b[a])(new d.Block);case 2:return this.$=f[a];case 3:this.$=d.addLocationDataFn(b[a],b[a])(d.Block.wrap([f[a]]));break;case 4:this.$=d.addLocationDataFn(b[a-2],b[a])(f[a-2].push(f[a]));break;case 5:this.$=f[a-1];break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 37:case 42:case 44:case 58:case 59:case 60:case 61:case 62:case 63:case 75:case 76:case 86:case 87:case 88:case 89:case 94:case 95:case 98:case 102:case 103:case 111:case 191:case 192:case 194:case 224:case 225:case 243:case 249:this.$=
f[a];break;case 13:this.$=d.addLocationDataFn(b[a],b[a])(new d.StatementLiteral(f[a]));break;case 29:this.$=d.addLocationDataFn(b[a],b[a])(new d.Op(f[a],new d.Value(new d.Literal(""))));break;case 30:case 253:case 254:case 257:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op(f[a-1],f[a]));break;case 31:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Op(f[a-2].concat(f[a-1]),f[a]));break;case 32:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Block);break;case 33:case 112:this.$=d.addLocationDataFn(b[a-
2],b[a])(f[a-1]);break;case 34:this.$=d.addLocationDataFn(b[a],b[a])(new d.IdentifierLiteral(f[a]));break;case 35:this.$=d.addLocationDataFn(b[a],b[a])(new d.PropertyName(f[a]));break;case 36:this.$=d.addLocationDataFn(b[a],b[a])(new d.NumberLiteral(f[a]));break;case 38:this.$=d.addLocationDataFn(b[a],b[a])(new d.StringLiteral(f[a]));break;case 39:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.StringWithInterpolations(f[a-1]));break;case 40:this.$=d.addLocationDataFn(b[a],b[a])(new d.RegexLiteral(f[a]));
break;case 41:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.RegexWithInterpolations(f[a-1].args));break;case 43:this.$=d.addLocationDataFn(b[a],b[a])(new d.PassthroughLiteral(f[a]));break;case 45:this.$=d.addLocationDataFn(b[a],b[a])(new d.UndefinedLiteral);break;case 46:this.$=d.addLocationDataFn(b[a],b[a])(new d.NullLiteral);break;case 47:this.$=d.addLocationDataFn(b[a],b[a])(new d.BooleanLiteral(f[a]));break;case 48:this.$=d.addLocationDataFn(b[a],b[a])(new d.InfinityLiteral(f[a]));break;case 49:this.$=
d.addLocationDataFn(b[a],b[a])(new d.NaNLiteral);break;case 50:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Assign(f[a-2],f[a]));break;case 51:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Assign(f[a-3],f[a]));break;case 52:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Assign(f[a-4],f[a-1]));break;case 53:case 91:case 96:case 97:case 99:case 100:case 101:case 226:case 227:this.$=d.addLocationDataFn(b[a],b[a])(new d.Value(f[a]));break;case 54:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Assign(d.addLocationDataFn(b[a-
2])(new d.Value(f[a-2])),f[a],"object",{operatorToken:d.addLocationDataFn(b[a-1])(new d.Literal(f[a-1]))}));break;case 55:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Assign(d.addLocationDataFn(b[a-4])(new d.Value(f[a-4])),f[a-1],"object",{operatorToken:d.addLocationDataFn(b[a-3])(new d.Literal(f[a-3]))}));break;case 56:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Assign(d.addLocationDataFn(b[a-2])(new d.Value(f[a-2])),f[a],null,{operatorToken:d.addLocationDataFn(b[a-1])(new d.Literal(f[a-1]))}));
break;case 57:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Assign(d.addLocationDataFn(b[a-4])(new d.Value(f[a-4])),f[a-1],null,{operatorToken:d.addLocationDataFn(b[a-3])(new d.Literal(f[a-3]))}));break;case 64:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Return(f[a]));break;case 65:this.$=d.addLocationDataFn(b[a],b[a])(new d.Return);break;case 66:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.YieldReturn(f[a]));break;case 67:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.YieldReturn);break;case 68:this.$=
d.addLocationDataFn(b[a-2],b[a])(new d.AwaitReturn(f[a]));break;case 69:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.AwaitReturn);break;case 70:this.$=d.addLocationDataFn(b[a],b[a])(new d.Comment(f[a]));break;case 71:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Code(f[a-3],f[a],f[a-1]));break;case 72:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Code([],f[a],f[a-1]));break;case 73:this.$=d.addLocationDataFn(b[a],b[a])("func");break;case 74:this.$=d.addLocationDataFn(b[a],b[a])("boundfunc");break;
case 77:case 117:this.$=d.addLocationDataFn(b[a],b[a])([]);break;case 78:case 118:case 137:case 157:case 186:case 228:this.$=d.addLocationDataFn(b[a],b[a])([f[a]]);break;case 79:case 119:case 138:case 158:case 187:this.$=d.addLocationDataFn(b[a-2],b[a])(f[a-2].concat(f[a]));break;case 80:case 120:case 139:case 159:case 188:this.$=d.addLocationDataFn(b[a-3],b[a])(f[a-3].concat(f[a]));break;case 81:case 121:case 141:case 161:case 190:this.$=d.addLocationDataFn(b[a-5],b[a])(f[a-5].concat(f[a-2]));break;
case 82:this.$=d.addLocationDataFn(b[a],b[a])(new d.Param(f[a]));break;case 83:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Param(f[a-1],null,!0));break;case 84:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Param(f[a-2],f[a]));break;case 85:case 193:this.$=d.addLocationDataFn(b[a],b[a])(new d.Expansion);break;case 90:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Splat(f[a-1]));break;case 92:this.$=d.addLocationDataFn(b[a-1],b[a])(f[a-1].add(f[a]));break;case 93:this.$=d.addLocationDataFn(b[a-1],
b[a])(new d.Value(f[a-1],[].concat(f[a])));break;case 104:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Super(d.addLocationDataFn(b[a])(new d.Access(f[a]))));break;case 105:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Super(d.addLocationDataFn(b[a-1])(new d.Index(f[a-1]))));break;case 106:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Access(f[a]));break;case 107:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Access(f[a],"soak"));break;case 108:this.$=d.addLocationDataFn(b[a-1],b[a])([d.addLocationDataFn(b[a-
1])(new d.Access(new d.PropertyName("prototype"))),d.addLocationDataFn(b[a])(new d.Access(f[a]))]);break;case 109:this.$=d.addLocationDataFn(b[a-1],b[a])([d.addLocationDataFn(b[a-1])(new d.Access(new d.PropertyName("prototype"),"soak")),d.addLocationDataFn(b[a])(new d.Access(f[a]))]);break;case 110:this.$=d.addLocationDataFn(b[a],b[a])(new d.Access(new d.PropertyName("prototype")));break;case 113:this.$=d.addLocationDataFn(b[a-1],b[a])(d.extend(f[a],{soak:!0}));break;case 114:this.$=d.addLocationDataFn(b[a],
b[a])(new d.Index(f[a]));break;case 115:this.$=d.addLocationDataFn(b[a],b[a])(new d.Slice(f[a]));break;case 116:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Obj(f[a-2],f[a-3].generated));break;case 122:this.$=d.addLocationDataFn(b[a],b[a])(new d.Class);break;case 123:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Class(null,null,f[a]));break;case 124:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Class(null,f[a]));break;case 125:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Class(null,f[a-1],f[a]));
break;case 126:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Class(f[a]));break;case 127:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Class(f[a-1],null,f[a]));break;case 128:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Class(f[a-2],f[a]));break;case 129:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Class(f[a-3],f[a-1],f[a]));break;case 130:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.ImportDeclaration(null,f[a]));break;case 131:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.ImportDeclaration(new d.ImportClause(f[a-
2],null),f[a]));break;case 132:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.ImportDeclaration(new d.ImportClause(null,f[a-2]),f[a]));break;case 133:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.ImportDeclaration(new d.ImportClause(null,new d.ImportSpecifierList([])),f[a]));break;case 134:this.$=d.addLocationDataFn(b[a-6],b[a])(new d.ImportDeclaration(new d.ImportClause(null,new d.ImportSpecifierList(f[a-4])),f[a]));break;case 135:this.$=d.addLocationDataFn(b[a-5],b[a])(new d.ImportDeclaration(new d.ImportClause(f[a-
4],f[a-2]),f[a]));break;case 136:this.$=d.addLocationDataFn(b[a-8],b[a])(new d.ImportDeclaration(new d.ImportClause(f[a-7],new d.ImportSpecifierList(f[a-4])),f[a]));break;case 140:case 160:case 173:case 189:this.$=d.addLocationDataFn(b[a-3],b[a])(f[a-2]);break;case 142:this.$=d.addLocationDataFn(b[a],b[a])(new d.ImportSpecifier(f[a]));break;case 143:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ImportSpecifier(f[a-2],f[a]));break;case 144:this.$=d.addLocationDataFn(b[a],b[a])(new d.ImportSpecifier(new d.Literal(f[a])));
break;case 145:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ImportSpecifier(new d.Literal(f[a-2]),f[a]));break;case 146:this.$=d.addLocationDataFn(b[a],b[a])(new d.ImportDefaultSpecifier(f[a]));break;case 147:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ImportNamespaceSpecifier(new d.Literal(f[a-2]),f[a]));break;case 148:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList([])));break;case 149:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList(f[a-
2])));break;case 150:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.ExportNamedDeclaration(f[a]));break;case 151:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.ExportNamedDeclaration(new d.Assign(f[a-2],f[a],null,{moduleDeclaration:"export"})));break;case 152:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.ExportNamedDeclaration(new d.Assign(f[a-3],f[a],null,{moduleDeclaration:"export"})));break;case 153:this.$=d.addLocationDataFn(b[a-5],b[a])(new d.ExportNamedDeclaration(new d.Assign(f[a-4],f[a-1],null,
{moduleDeclaration:"export"})));break;case 154:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ExportDefaultDeclaration(f[a]));break;case 155:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.ExportAllDeclaration(new d.Literal(f[a-2]),f[a]));break;case 156:this.$=d.addLocationDataFn(b[a-6],b[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList(f[a-4]),f[a]));break;case 162:this.$=d.addLocationDataFn(b[a],b[a])(new d.ExportSpecifier(f[a]));break;case 163:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ExportSpecifier(f[a-
2],f[a]));break;case 164:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.ExportSpecifier(f[a-2],new d.Literal(f[a])));break;case 165:this.$=d.addLocationDataFn(b[a],b[a])(new d.ExportSpecifier(new d.Literal(f[a])));break;case 166:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.TaggedTemplateCall(f[a-2],f[a],f[a-1]));break;case 167:case 168:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Call(f[a-2],f[a],f[a-1]));break;case 169:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.SuperCall(d.addLocationDataFn(b[a-
2])(new d.Super),f[a],f[a-1]));break;case 170:this.$=d.addLocationDataFn(b[a],b[a])(!1);break;case 171:this.$=d.addLocationDataFn(b[a],b[a])(!0);break;case 172:this.$=d.addLocationDataFn(b[a-1],b[a])([]);break;case 174:case 175:this.$=d.addLocationDataFn(b[a],b[a])(new d.Value(new d.ThisLiteral));break;case 176:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Value(d.addLocationDataFn(b[a-1])(new d.ThisLiteral),[d.addLocationDataFn(b[a])(new d.Access(f[a]))],"this"));break;case 177:this.$=d.addLocationDataFn(b[a-
1],b[a])(new d.Arr([]));break;case 178:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Arr(f[a-2]));break;case 179:this.$=d.addLocationDataFn(b[a],b[a])("inclusive");break;case 180:this.$=d.addLocationDataFn(b[a],b[a])("exclusive");break;case 181:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Range(f[a-3],f[a-1],f[a-2]));break;case 182:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Range(f[a-2],f[a],f[a-1]));break;case 183:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Range(f[a-1],null,f[a]));break;case 184:this.$=
d.addLocationDataFn(b[a-1],b[a])(new d.Range(null,f[a],f[a-1]));break;case 185:this.$=d.addLocationDataFn(b[a],b[a])(new d.Range(null,null,f[a]));break;case 195:this.$=d.addLocationDataFn(b[a-2],b[a])([].concat(f[a-2],f[a]));break;case 196:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Try(f[a]));break;case 197:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Try(f[a-1],f[a][0],f[a][1]));break;case 198:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Try(f[a-2],null,null,f[a]));break;case 199:this.$=d.addLocationDataFn(b[a-
4],b[a])(new d.Try(f[a-3],f[a-2][0],f[a-2][1],f[a]));break;case 200:this.$=d.addLocationDataFn(b[a-2],b[a])([f[a-1],f[a]]);break;case 201:this.$=d.addLocationDataFn(b[a-2],b[a])([d.addLocationDataFn(b[a-1])(new d.Value(f[a-1])),f[a]]);break;case 202:this.$=d.addLocationDataFn(b[a-1],b[a])([null,f[a]]);break;case 203:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Throw(f[a]));break;case 204:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Parens(f[a-1]));break;case 205:this.$=d.addLocationDataFn(b[a-4],
b[a])(new d.Parens(f[a-2]));break;case 206:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.While(f[a]));break;case 207:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.While(f[a-2],{guard:f[a]}));break;case 208:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.While(f[a],{invert:!0}));break;case 209:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.While(f[a-2],{invert:!0,guard:f[a]}));break;case 210:this.$=d.addLocationDataFn(b[a-1],b[a])(f[a-1].addBody(f[a]));break;case 211:case 212:this.$=d.addLocationDataFn(b[a-
1],b[a])(f[a].addBody(d.addLocationDataFn(b[a-1])(d.Block.wrap([f[a-1]]))));break;case 213:this.$=d.addLocationDataFn(b[a],b[a])(f[a]);break;case 214:this.$=d.addLocationDataFn(b[a-1],b[a])((new d.While(d.addLocationDataFn(b[a-1])(new d.BooleanLiteral("true")))).addBody(f[a]));break;case 215:this.$=d.addLocationDataFn(b[a-1],b[a])((new d.While(d.addLocationDataFn(b[a-1])(new d.BooleanLiteral("true")))).addBody(d.addLocationDataFn(b[a])(d.Block.wrap([f[a]]))));break;case 216:case 217:this.$=d.addLocationDataFn(b[a-
1],b[a])(new d.For(f[a-1],f[a]));break;case 218:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.For(f[a],f[a-1]));break;case 219:this.$=d.addLocationDataFn(b[a-1],b[a])({source:d.addLocationDataFn(b[a])(new d.Value(f[a]))});break;case 220:this.$=d.addLocationDataFn(b[a-3],b[a])({source:d.addLocationDataFn(b[a-2])(new d.Value(f[a-2])),step:f[a]});break;case 221:d=d.addLocationDataFn(b[a-1],b[a]);f[a].own=f[a-1].own;f[a].ownTag=f[a-1].ownTag;f[a].name=f[a-1][0];f[a].index=f[a-1][1];this.$=d(f[a]);break;
case 222:this.$=d.addLocationDataFn(b[a-1],b[a])(f[a]);break;case 223:c=d.addLocationDataFn(b[a-2],b[a]);f[a].own=!0;f[a].ownTag=d.addLocationDataFn(b[a-1])(new d.Literal(f[a-1]));this.$=c(f[a]);break;case 229:this.$=d.addLocationDataFn(b[a-2],b[a])([f[a-2],f[a]]);break;case 230:this.$=d.addLocationDataFn(b[a-1],b[a])({source:f[a]});break;case 231:this.$=d.addLocationDataFn(b[a-1],b[a])({source:f[a],object:!0});break;case 232:this.$=d.addLocationDataFn(b[a-3],b[a])({source:f[a-2],guard:f[a]});break;
case 233:this.$=d.addLocationDataFn(b[a-3],b[a])({source:f[a-2],guard:f[a],object:!0});break;case 234:this.$=d.addLocationDataFn(b[a-3],b[a])({source:f[a-2],step:f[a]});break;case 235:this.$=d.addLocationDataFn(b[a-5],b[a])({source:f[a-4],guard:f[a-2],step:f[a]});break;case 236:this.$=d.addLocationDataFn(b[a-5],b[a])({source:f[a-4],step:f[a-2],guard:f[a]});break;case 237:this.$=d.addLocationDataFn(b[a-1],b[a])({source:f[a],from:!0});break;case 238:this.$=d.addLocationDataFn(b[a-3],b[a])({source:f[a-
2],guard:f[a],from:!0});break;case 239:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Switch(f[a-3],f[a-1]));break;case 240:this.$=d.addLocationDataFn(b[a-6],b[a])(new d.Switch(f[a-5],f[a-3],f[a-1]));break;case 241:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Switch(null,f[a-1]));break;case 242:this.$=d.addLocationDataFn(b[a-5],b[a])(new d.Switch(null,f[a-3],f[a-1]));break;case 244:this.$=d.addLocationDataFn(b[a-1],b[a])(f[a-1].concat(f[a]));break;case 245:this.$=d.addLocationDataFn(b[a-2],b[a])([[f[a-
1],f[a]]]);break;case 246:this.$=d.addLocationDataFn(b[a-3],b[a])([[f[a-2],f[a-1]]]);break;case 247:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.If(f[a-1],f[a],{type:f[a-2]}));break;case 248:this.$=d.addLocationDataFn(b[a-4],b[a])(f[a-4].addElse(d.addLocationDataFn(b[a-2],b[a])(new d.If(f[a-1],f[a],{type:f[a-2]}))));break;case 250:this.$=d.addLocationDataFn(b[a-2],b[a])(f[a-2].addElse(f[a]));break;case 251:case 252:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.If(f[a],d.addLocationDataFn(b[a-2])(d.Block.wrap([f[a-
2]])),{type:f[a-1],statement:!0}));break;case 255:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op("-",f[a]));break;case 256:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op("+",f[a]));break;case 258:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op("--",f[a]));break;case 259:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op("++",f[a]));break;case 260:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op("--",f[a-1],null,!0));break;case 261:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Op("++",f[a-1],null,
!0));break;case 262:this.$=d.addLocationDataFn(b[a-1],b[a])(new d.Existence(f[a-1]));break;case 263:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Op("+",f[a-2],f[a]));break;case 264:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Op("-",f[a-2],f[a]));break;case 265:case 266:case 267:case 268:case 269:case 270:case 271:case 272:case 273:case 274:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Op(f[a-1],f[a-2],f[a]));break;case 275:b=d.addLocationDataFn(b[a-2],b[a]);f="!"===f[a-1].charAt(0)?(new d.Op(f[a-
1].slice(1),f[a-2],f[a])).invert():new d.Op(f[a-1],f[a-2],f[a]);this.$=b(f);break;case 276:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Assign(f[a-2],f[a],f[a-1]));break;case 277:this.$=d.addLocationDataFn(b[a-4],b[a])(new d.Assign(f[a-4],f[a-1],f[a-3]));break;case 278:this.$=d.addLocationDataFn(b[a-3],b[a])(new d.Assign(f[a-3],f[a],f[a-2]));break;case 279:this.$=d.addLocationDataFn(b[a-2],b[a])(new d.Extends(f[a-2],f[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:25,11:26,12:20,13:21,14:g,15:23,
16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:q,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:sa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{1:[3]},{1:[2,2],6:xa},a(ua,[2,3]),a(ua,[2,6],{144:80,135:105,
141:106,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(ua,[2,7],{144:80,135:108,141:109,136:G,138:C,142:F,159:ra}),a(ua,[2,8]),a(wa,[2,16],{114:110,81:111,93:117,42:Qa,43:Qa,117:Qa,87:Xa,88:Ha,90:Ya,91:cb,92:Ra,95:Ia,116:Fa}),a(wa,[2,17],{93:117,114:120,81:121,87:Xa,88:Ha,90:Ya,91:cb,92:Ra,95:Ia,116:Fa,117:Qa}),a(wa,[2,18]),a(wa,[2,19]),a(wa,[2,20]),a(wa,[2,21]),a(wa,[2,22]),a(wa,[2,23]),a(wa,[2,24]),a(wa,[2,25]),a(wa,[2,
26]),a(wa,[2,27]),a(wa,[2,28]),a(Ea,[2,11]),a(Ea,[2,12]),a(Ea,[2,13]),a(Ea,[2,14]),a(Ea,[2,15]),a(ua,[2,9]),a(ua,[2,10]),a(Ba,Sa,{57:[1,122]}),a(Ba,[2,99]),a(Ba,[2,100]),a(Ba,[2,101]),a(Ba,[2,102]),a(Ba,[2,103]),{87:[1,124],88:[1,125],114:123,116:Fa,117:Qa},a([6,33,68,73],Ta,{67:126,74:127,75:128,35:130,62:131,77:132,78:133,36:m,76:db,97:x,121:Ja,122:Ma}),{32:136,33:Ca},{7:138,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,
36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:142,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,
42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:143,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,
49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:144,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,
54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:145,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,
63:[1,146],64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{17:148,18:149,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:150,62:74,77:57,78:58,80:147,82:29,83:30,84:31,85:32,86:H,97:x,120:Q,121:R,122:M,133:P},{17:148,18:149,35:73,36:m,39:59,40:c,41:83,42:e,
43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:150,62:74,77:57,78:58,80:151,82:29,83:30,84:31,85:32,86:H,97:x,120:Q,121:R,122:M,133:P},a(Ua,ya,{101:[1,155],164:[1,152],165:[1,153],178:[1,154]}),a(wa,[2,249],{154:[1,156]}),{32:157,33:Ca},{32:158,33:Ca},a(wa,[2,213]),{32:159,33:Ca},{7:160,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:[1,161],35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,
53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(gb,[2,122],{49:28,82:29,83:30,84:31,85:32,77:57,78:58,39:59,45:61,35:73,62:74,41:83,17:148,18:149,56:150,32:162,80:164,33:Ca,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,86:H,97:x,101:[1,163],120:Q,121:R,
122:M,133:P}),{7:165,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a([1,6,34,
44,134,136,138,142,159,166,167,168,169,170,171,172,173,174,175,176,177],eb,{17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,56:27,49:28,82:29,83:30,84:31,85:32,69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,8:140,7:166,14:g,30:ga,31:fb,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:[1,168],64:fa,65:h,66:n,70:u,71:t,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,140:Z,152:ca,
158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X}),a(Ea,Oa,{17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,56:27,49:28,82:29,83:30,84:31,85:32,69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,8:140,7:169,14:g,30:ga,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:p,64:fa,65:h,66:n,70:u,71:t,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,140:Z,152:ca,158:S,160:V,161:K,162:aa,163:ba,
164:Y,165:X}),a([1,6,33,34,44,73,99,134,136,138,142,159],[2,70]),{35:174,36:m,41:170,42:e,43:y,97:[1,173],103:171,104:172,109:hb},{27:177,35:178,36:m,97:[1,176],100:r,108:[1,179],112:[1,180]},a(Ua,[2,96]),a(Ua,[2,97]),a(Ba,[2,42]),a(Ba,[2,43]),a(Ba,[2,44]),a(Ba,[2,45]),a(Ba,[2,46]),a(Ba,[2,47]),a(Ba,[2,48]),a(Ba,[2,49]),{4:181,5:3,7:4,8:5,9:6,10:25,11:26,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:q,33:[1,182],35:73,36:m,39:59,40:c,41:83,
42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:sa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:183,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:Za,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,
46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:Ga,77:57,78:58,79:188,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,119:185,120:Q,121:R,122:M,123:mb,126:186,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Ba,[2,174]),a(Ba,[2,175],{37:190,38:La}),{33:[2,73]},{33:[2,74]},a(Ka,[2,91]),a(Ka,[2,94]),{7:192,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,
21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:193,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,
25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:194,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,
29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:196,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,32:195,33:Ca,
35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{35:201,36:m,62:202,77:203,78:204,83:197,97:x,121:Ja,122:M,146:198,147:[1,199],148:200},{145:205,149:[1,206],150:[1,207],151:[1,208]},a([6,33,73,
99],nb,{41:83,98:209,58:210,59:211,61:212,13:213,39:214,35:215,37:216,62:217,36:m,38:La,40:c,42:e,43:y,65:h,121:Ja}),a(ob,[2,36]),a(ob,[2,37]),a(Ba,[2,40]),{17:148,18:218,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:150,62:74,77:57,78:58,80:219,82:29,83:30,84:31,85:32,86:H,97:x,120:Q,121:R,122:M,133:P},a([1,6,31,33,34,42,43,44,57,60,68,73,76,87,88,89,90,91,92,95,99,101,107,116,117,118,123,125,134,136,137,138,142,143,149,150,151,159,162,163,164,165,166,
167,168,169,170,171,172,173,174,175,176,177,178],[2,34]),a(Va,[2,38]),{4:220,5:3,7:4,8:5,9:6,10:25,11:26,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:q,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:sa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,
144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(ua,[2,5],{7:4,8:5,9:6,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,10:25,11:26,56:27,49:28,82:29,83:30,84:31,85:32,69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,5:221,14:g,30:q,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:p,64:sa,65:h,66:n,70:u,71:t,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,136:G,
138:C,140:Z,142:F,152:ca,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X}),a(wa,[2,262]),{7:222,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,
152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:223,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,
161:K,162:aa,163:ba,164:Y,165:X},{7:224,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,
165:X},{7:225,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:226,8:140,12:20,
13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:227,8:140,12:20,13:21,14:g,15:23,16:24,
17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:228,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,
22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:229,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,
26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:230,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,
30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:231,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,
40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:232,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,
46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:233,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,
52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:234,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,
62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:235,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,
66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(wa,[2,212]),a(wa,[2,217]),{7:236,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,
65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(wa,[2,211]),a(wa,[2,216]),{41:237,42:e,43:y,115:238,117:ib},a(Ka,[2,92]),a(pb,[2,171]),{37:240,38:La},{37:241,38:La},a(Ka,[2,110],{37:242,38:La}),{37:243,38:La},a(Ka,[2,111]),{7:245,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,
24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:qb,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,94:244,96:246,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,124:247,125:b,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{88:Ha,93:250,95:Ia},{115:251,117:ib},a(Ka,[2,93]),{6:[1,253],7:252,8:140,
12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:[1,254],35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{115:255,117:ib},{37:256,
38:La},{7:257,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a([6,33],v,{72:260,
68:[1,258],73:L}),a(d,[2,78]),a(d,[2,82],{57:[1,262],76:[1,261]}),a(d,[2,85]),a(f,[2,86]),a(f,[2,87]),a(f,[2,88]),a(f,[2,89]),{37:190,38:La},{7:263,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:Za,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:Ga,77:57,78:58,79:188,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,119:185,120:Q,
121:R,122:M,123:mb,126:186,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(wa,[2,72]),{4:265,5:3,7:4,8:5,9:6,10:25,11:26,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:q,34:[1,264],35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:sa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,
86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Wa,[2,253],{144:80,135:105,141:106,166:I}),{7:145,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,
83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{135:108,136:G,138:C,141:109,142:F,144:80,159:ra},a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,166,167,168,169,170,171,172,173,174,175,176,177],eb,{17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,56:27,49:28,82:29,83:30,84:31,85:32,
69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,8:140,7:166,14:g,30:ga,31:fb,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:p,64:fa,65:h,66:n,70:u,71:t,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,140:Z,152:ca,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X}),a(Da,[2,254],{144:80,135:105,141:106,166:I,168:da}),a(Da,[2,255],{144:80,135:105,141:106,166:I,168:da}),a(Da,[2,256],{144:80,135:105,141:106,166:I,168:da}),a(Wa,[2,257],
{144:80,135:105,141:106,166:I}),a(ua,[2,69],{17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,56:27,49:28,82:29,83:30,84:31,85:32,69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,8:140,7:266,14:g,30:ga,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:p,64:fa,65:h,66:n,70:u,71:t,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,136:Oa,138:Oa,142:Oa,159:Oa,140:Z,152:ca,158:S,160:V,161:K,
162:aa,163:ba,164:Y,165:X}),a(wa,[2,258],{42:ya,43:ya,87:ya,88:ya,90:ya,91:ya,92:ya,95:ya,116:ya,117:ya}),a(pb,Qa,{114:110,81:111,93:117,87:Xa,88:Ha,90:Ya,91:cb,92:Ra,95:Ia,116:Fa}),{81:121,87:Xa,88:Ha,90:Ya,91:cb,92:Ra,93:117,95:Ia,114:120,116:Fa,117:Qa},a(rb,Sa),a(wa,[2,259],{42:ya,43:ya,87:ya,88:ya,90:ya,91:ya,92:ya,95:ya,116:ya,117:ya}),a(wa,[2,260]),a(wa,[2,261]),{6:[1,269],7:267,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,
33:[1,268],35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:270,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,
39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{32:271,33:Ca,158:[1,272]},a(wa,[2,196],{129:273,130:[1,274],131:[1,275]}),a(wa,[2,210]),a(wa,[2,218]),{33:[1,276],135:105,136:G,138:C,141:106,142:F,144:80,
159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},{153:277,155:278,156:vb},a(wa,[2,123]),{7:280,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,
133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(gb,[2,126],{32:281,33:Ca,42:ya,43:ya,87:ya,88:ya,90:ya,91:ya,92:ya,95:ya,116:ya,117:ya,101:[1,282]}),a(Pa,[2,203],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Pa,[2,30],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{7:283,8:140,
12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(ua,[2,67],{17:7,18:8,19:9,20:10,21:11,
22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,56:27,49:28,82:29,83:30,84:31,85:32,69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,8:140,7:284,14:g,30:ga,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:p,64:fa,65:h,66:n,70:u,71:t,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,136:Oa,138:Oa,142:Oa,159:Oa,140:Z,152:ca,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X}),a(Ea,$a,{144:80,135:105,141:106,162:la,
163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Ea,[2,130]),{31:[1,285],73:[1,286]},{31:[1,287]},{33:wb,35:292,36:m,99:[1,288],105:289,106:290,108:jb},a([31,73],[2,146]),{107:[1,294]},{33:Hb,35:299,36:m,99:[1,295],108:sb,111:296,113:297},a(Ea,[2,150]),{57:[1,301]},{7:302,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,
52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{31:[1,303]},{6:xa,134:[1,304]},{4:305,5:3,7:4,8:5,9:6,10:25,11:26,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:q,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,
46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:sa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a([6,33,73,123],Sb,{144:80,135:105,141:106,124:306,76:[1,307],125:b,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),
a(Ib,[2,177]),a([6,33,123],v,{72:308,73:xb}),a(ab,[2,186]),{7:263,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:Za,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:Ga,77:57,78:58,79:188,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,119:310,120:Q,121:R,122:M,126:186,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,
142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(ab,[2,192]),a(ab,[2,193]),a(Tb,[2,176]),a(Tb,[2,35]),{32:311,33:Ca,135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(Ub,[2,206],{144:80,135:105,141:106,136:G,137:[1,312],138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Ub,[2,208],{144:80,135:105,141:106,136:G,137:[1,
313],138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(wa,[2,214]),a(kb,[2,215],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,159,162,163,166,167,168,169,170,171,172,173,174,175,176,177],[2,219],{143:[1,314]}),a(yb,[2,222]),{35:201,36:m,62:202,77:203,78:204,97:x,121:Ja,122:Ma,146:315,
148:200},a(yb,[2,228],{73:[1,316]}),a(zb,[2,224]),a(zb,[2,225]),a(zb,[2,226]),a(zb,[2,227]),a(wa,[2,221]),{7:317,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,
141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:318,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,
157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:319,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,
162:aa,163:ba,164:Y,165:X},a(Ab,v,{72:320,73:Vb}),a(Aa,[2,118]),a(Aa,[2,53],{60:[1,322]}),a(Wb,[2,62],{57:[1,323]}),a(Aa,[2,58]),a(Wb,[2,63]),a(Jb,[2,59]),a(Jb,[2,60]),a(Jb,[2,61]),{48:[1,324],81:121,87:Xa,88:Ha,90:Ya,91:cb,92:Ra,93:117,95:Ia,114:120,116:Fa,117:Qa},a(rb,ya),{6:xa,44:[1,325]},a(ua,[2,4]),a(Xb,[2,263],{144:80,135:105,141:106,166:I,167:ja,168:da}),a(Xb,[2,264],{144:80,135:105,141:106,166:I,167:ja,168:da}),a(Da,[2,265],{144:80,135:105,141:106,166:I,168:da}),a(Da,[2,266],{144:80,135:105,
141:106,166:I,168:da}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,169,170,171,172,173,174,175,176,177],[2,267],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,170,171,172,173,174,175,176],[2,268],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,171,172,173,174,175,176],[2,269],{144:80,135:105,
141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,172,173,174,175,176],[2,270],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,173,174,175,176],[2,271],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,
142,143,159,174,175,176],[2,272],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,175,176],[2,273],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,176],[2,274],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,
173:ea,174:N,175:qa,177:na}),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,143,159,170,171,172,173,174,175,176,177],[2,275],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa}),a(kb,[2,252],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(kb,[2,251],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,
177:na}),a(lb,[2,166]),a(lb,[2,167]),{7:263,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:Za,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:Ga,77:57,78:58,79:188,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,118:[1,326],119:327,120:Q,121:R,122:M,126:186,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,
152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Ka,[2,106]),a(Ka,[2,107]),a(Ka,[2,108]),a(Ka,[2,109]),{89:[1,328]},{76:qb,89:[2,114],124:329,125:b,135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},{89:[2,115]},{7:330,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,
50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,89:[2,185],97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Yb,[2,179]),a(Yb,Zb),a(Ka,[2,113]),a(lb,[2,168]),a(Pa,[2,50],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{7:331,8:140,
12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:332,8:140,12:20,13:21,14:g,15:23,
16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(lb,[2,169]),a(Ba,[2,104]),{89:[1,333],135:105,136:G,138:C,
141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},{69:334,70:u,71:t},a(bb,tb,{75:128,35:130,62:131,77:132,78:133,74:335,36:m,76:db,97:x,121:Ja,122:Ma}),{6:$b,33:ac},a(d,[2,83]),{7:338,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,
70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(ab,Sb,{144:80,135:105,141:106,76:[1,339],136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(bc,[2,32]),{6:xa,34:[1,340]},a(ua,[2,68],{144:80,135:105,141:106,136:$a,138:$a,142:$a,159:$a,162:la,163:ma,
166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Pa,[2,276],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{7:341,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,
83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:342,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,
97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Pa,[2,279],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(wa,[2,250]),{7:343,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,
50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(wa,[2,197],{130:[1,344]}),{32:345,33:Ca},{32:348,33:Ca,35:346,36:m,78:347,97:x},{153:349,155:278,156:vb},{34:[1,350],154:[1,351],155:352,156:vb},a(Bb,[2,243]),{7:354,8:140,12:20,13:21,14:g,15:23,16:24,17:7,
18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,127:353,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(cc,[2,124],{144:80,135:105,141:106,32:355,33:Ca,136:G,138:C,
142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(wa,[2,127]),{7:356,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,
139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Pa,[2,31],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(ua,[2,66],{144:80,135:105,141:106,136:$a,138:$a,142:$a,159:$a,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{41:357,42:e,43:y},{97:[1,359],104:358,109:hb},{41:360,42:e,43:y},{31:[1,361]},a(Ab,v,{72:362,73:Cb}),a(Aa,[2,137]),
{33:wb,35:292,36:m,105:364,106:290,108:jb},a(Aa,[2,142],{107:[1,365]}),a(Aa,[2,144],{107:[1,366]}),{35:367,36:m},a(Ea,[2,148]),a(Ab,v,{72:368,73:Kb}),a(Aa,[2,157]),{33:Hb,35:299,36:m,108:sb,111:370,113:297},a(Aa,[2,162],{107:[1,371]}),a(Aa,[2,165]),{6:[1,373],7:372,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:[1,374],35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,
65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Lb,[2,154],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{41:375,42:e,43:y},a(Ba,[2,204]),{6:xa,34:[1,376]},{7:377,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,
20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a([14,30,36,40,42,43,46,47,50,51,52,53,54,55,63,64,65,66,70,71,86,97,100,102,110,
120,121,122,128,132,133,136,138,140,142,152,158,160,161,162,163,164,165],Zb,{6:ub,33:ub,73:ub,123:ub}),{6:Db,33:Eb,123:[1,378]},a([6,33,34,118,123],tb,{17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,12:20,13:21,15:23,16:24,56:27,49:28,82:29,83:30,84:31,85:32,69:35,80:43,157:44,135:46,139:47,141:48,77:57,78:58,39:59,45:61,35:73,62:74,144:80,41:83,8:140,79:188,7:263,126:381,14:g,30:ga,36:m,40:c,42:e,43:y,46:D,47:w,50:z,51:l,52:E,53:A,54:B,55:J,63:p,64:fa,65:h,66:n,70:u,71:t,
76:Ga,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,136:G,138:C,140:Z,142:F,152:ca,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X}),a(bb,v,{72:382,73:xb}),a(dc,[2,247]),{7:383,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,
102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:384,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,
122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:385,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,
135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(yb,[2,223]),{35:201,36:m,62:202,77:203,78:204,97:x,121:Ja,122:Ma,148:386},a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,138,142,159],[2,230],{144:80,135:105,141:106,137:[1,387],143:[1,388],162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Mb,[2,231],{144:80,135:105,141:106,137:[1,389],162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,
171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Mb,[2,237],{144:80,135:105,141:106,137:[1,390],162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{6:ec,33:fc,99:[1,391]},a(Nb,tb,{41:83,59:211,61:212,13:213,39:214,35:215,37:216,62:217,58:394,36:m,38:La,40:c,42:e,43:y,65:h,121:Ja}),{7:395,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:[1,396],35:73,36:m,39:59,40:c,41:83,42:e,43:y,
45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:397,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:[1,398],35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,
47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Ba,[2,41]),a(Va,[2,39]),a(lb,[2,172]),a([6,33,118],v,{72:399,73:xb}),a(Ka,[2,112]),{7:400,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,
29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,89:[2,183],97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{89:[2,184],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,
173:ea,174:N,175:qa,176:va,177:na},a(Pa,[2,51],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{34:[1,401],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(Ba,[2,105]),{32:402,33:Ca},a(d,[2,79]),{35:130,36:m,62:131,74:403,75:128,76:db,77:132,78:133,97:x,121:Ja,122:Ma},a(gc,Ta,{74:127,75:128,35:130,62:131,77:132,78:133,67:404,36:m,
76:db,97:x,121:Ja,122:Ma}),a(d,[2,84],{144:80,135:105,141:106,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(ab,ub),a(bc,[2,33]),{34:[1,405],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(Pa,[2,278],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{32:406,
33:Ca,135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},{32:407,33:Ca},a(wa,[2,198]),{32:408,33:Ca},{32:409,33:Ca},a(Ob,[2,202]),{34:[1,410],154:[1,411],155:352,156:vb},a(wa,[2,241]),{32:412,33:Ca},a(Bb,[2,244]),{32:413,33:Ca,73:[1,414]},a(hc,[2,194],{144:80,135:105,141:106,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(wa,[2,
125]),a(cc,[2,128],{144:80,135:105,141:106,32:415,33:Ca,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Ea,[2,131]),{31:[1,416]},{33:wb,35:292,36:m,105:417,106:290,108:jb},a(Ea,[2,132]),{41:418,42:e,43:y},{6:Fb,33:Gb,99:[1,419]},a(Nb,tb,{35:292,106:422,36:m,108:jb}),a(bb,v,{72:423,73:Cb}),{35:424,36:m},{35:425,36:m},{31:[2,147]},{6:Pb,33:Qb,99:[1,426]},a(Nb,tb,{35:299,113:429,36:m,108:sb}),a(bb,v,{72:430,73:Kb}),{35:431,36:m,108:[1,
432]},a(Lb,[2,151],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{7:433,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,
122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:434,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,
135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Ea,[2,155]),{134:[1,435]},{123:[1,436],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(Ib,[2,178]),{7:263,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,
52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:Ga,77:57,78:58,79:188,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,126:437,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:263,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,33:Za,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,
51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,76:Ga,77:57,78:58,79:188,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,119:438,120:Q,121:R,122:M,126:186,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(ab,[2,187]),{6:Db,33:Eb,34:[1,439]},a(kb,[2,207],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,
177:na}),a(kb,[2,209],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(kb,[2,220],{144:80,135:105,141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(yb,[2,229]),{7:440,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,
47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:441,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,
53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:442,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,
63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:443,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,
70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Ib,[2,116]),{13:213,35:215,36:m,37:216,38:La,39:214,40:c,41:83,42:e,43:y,58:444,59:211,61:212,62:217,65:h,121:Ja},a(gc,nb,{41:83,58:210,59:211,61:212,13:213,39:214,35:215,37:216,62:217,98:445,36:m,38:La,40:c,42:e,43:y,65:h,121:Ja}),a(Aa,[2,119]),a(Aa,[2,54],{144:80,135:105,
141:106,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{7:446,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,
136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(Aa,[2,56],{144:80,135:105,141:106,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{7:447,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,
66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{6:Db,33:Eb,118:[1,448]},{89:[2,182],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(wa,[2,52]),a(wa,[2,71]),a(d,[2,80]),a(bb,v,{72:449,73:L}),a(wa,[2,277]),a(dc,[2,
248]),a(wa,[2,199]),a(Ob,[2,200]),a(Ob,[2,201]),a(wa,[2,239]),{32:450,33:Ca},{34:[1,451]},a(Bb,[2,245],{6:[1,452]}),{7:453,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,
139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},a(wa,[2,129]),{41:454,42:e,43:y},a(Ab,v,{72:455,73:Cb}),a(Ea,[2,133]),{31:[1,456]},{35:292,36:m,106:457,108:jb},{33:wb,35:292,36:m,105:458,106:290,108:jb},a(Aa,[2,138]),{6:Fb,33:Gb,34:[1,459]},a(Aa,[2,143]),a(Aa,[2,145]),a(Ea,[2,149],{31:[1,460]}),{35:299,36:m,108:sb,113:461},{33:Hb,35:299,36:m,108:sb,111:462,113:297},a(Aa,[2,158]),{6:Pb,33:Qb,34:[1,463]},a(Aa,[2,163]),a(Aa,[2,164]),a(Lb,[2,152],{144:80,135:105,
141:106,136:G,138:C,142:F,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),{34:[1,464],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(Ba,[2,205]),a(Ba,[2,181]),a(ab,[2,188]),a(bb,v,{72:465,73:xb}),a(ab,[2,189]),a([1,6,33,34,44,68,73,76,89,99,118,123,125,134,136,137,138,142,159],[2,232],{144:80,135:105,141:106,143:[1,466],162:la,163:ma,166:I,167:ja,168:da,
169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Mb,[2,234],{144:80,135:105,141:106,137:[1,467],162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Pa,[2,233],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Pa,[2,238],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Aa,[2,120]),a(bb,v,
{72:468,73:Vb}),{34:[1,469],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},{34:[1,470],135:105,136:G,138:C,141:106,142:F,144:80,159:za,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na},a(lb,[2,173]),{6:$b,33:ac,34:[1,471]},{34:[1,472]},a(wa,[2,242]),a(Bb,[2,246]),a(hc,[2,195],{144:80,135:105,141:106,136:G,138:C,142:F,159:za,162:la,163:ma,166:I,167:ja,168:da,
169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Ea,[2,135]),{6:Fb,33:Gb,99:[1,473]},{41:474,42:e,43:y},a(Aa,[2,139]),a(bb,v,{72:475,73:Cb}),a(Aa,[2,140]),{41:476,42:e,43:y},a(Aa,[2,159]),a(bb,v,{72:477,73:Kb}),a(Aa,[2,160]),a(Ea,[2,153]),{6:Db,33:Eb,34:[1,478]},{7:479,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,
63:p,64:fa,65:h,66:n,69:35,70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{7:480,8:140,12:20,13:21,14:g,15:23,16:24,17:7,18:8,19:9,20:10,21:11,22:12,23:13,24:14,25:15,26:16,27:17,28:18,29:19,30:ga,35:73,36:m,39:59,40:c,41:83,42:e,43:y,45:61,46:D,47:w,49:28,50:z,51:l,52:E,53:A,54:B,55:J,56:27,62:74,63:p,64:fa,65:h,66:n,69:35,
70:u,71:t,77:57,78:58,80:43,82:29,83:30,84:31,85:32,86:H,97:x,100:r,102:W,110:T,120:Q,121:R,122:M,128:U,132:O,133:P,135:46,136:G,138:C,139:47,140:Z,141:48,142:F,144:80,152:ca,157:44,158:S,160:V,161:K,162:aa,163:ba,164:Y,165:X},{6:ec,33:fc,34:[1,481]},a(Aa,[2,55]),a(Aa,[2,57]),a(d,[2,81]),a(wa,[2,240]),{31:[1,482]},a(Ea,[2,134]),{6:Fb,33:Gb,34:[1,483]},a(Ea,[2,156]),{6:Pb,33:Qb,34:[1,484]},a(ab,[2,190]),a(Pa,[2,235],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,
173:ea,174:N,175:qa,176:va,177:na}),a(Pa,[2,236],{144:80,135:105,141:106,162:la,163:ma,166:I,167:ja,168:da,169:oa,170:ia,171:ka,172:pa,173:ea,174:N,175:qa,176:va,177:na}),a(Aa,[2,121]),{41:485,42:e,43:y},a(Aa,[2,141]),a(Aa,[2,161]),a(Ea,[2,136])],defaultActions:{71:[2,73],72:[2,74],246:[2,115],367:[2,147]},parseError:function(a,d){if(d.recoverable)this.trace(a);else{var b=function(a,d){this.message=a;this.hash=d};b.prototype=Error;throw new b(a,d);}},parse:function(a){var d=[0],b=[null],f=[],v=this.table,
L="",c=0,e=0,h=0,g=f.slice.call(arguments,1),l=Object.create(this.lexer),Wa={},n;for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(Wa[n]=this.yy[n]);l.setInput(a,Wa);Wa.lexer=l;Wa.parser=this;"undefined"==typeof l.yylloc&&(l.yylloc={});n=l.yylloc;f.push(n);var k=l.options&&l.options.ranges;this.parseError="function"===typeof Wa.parseError?Wa.parseError:Object.getPrototypeOf(this).parseError;for(var Da,p,m,u,t={},x,r;;){m=d[d.length-1];if(this.defaultActions[m])u=this.defaultActions[m];
else{if(null===Da||"undefined"==typeof Da)Da=l.lex()||1,"number"!==typeof Da&&(Da=this.symbols_[Da]||Da);u=v[m]&&v[m][Da]}if("undefined"===typeof u||!u.length||!u[0]){var rb;r=[];for(x in v[m])this.terminals_[x]&&2<x&&r.push("'"+this.terminals_[x]+"'");rb=l.showPosition?"Parse error on line "+(c+1)+":\n"+l.showPosition()+"\nExpecting "+r.join(", ")+", got '"+(this.terminals_[Da]||Da)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==Da?"end of input":"'"+(this.terminals_[Da]||Da)+"'");this.parseError(rb,
{text:l.match,token:this.terminals_[Da]||Da,line:l.yylineno,loc:n,expected:r})}if(u[0]instanceof Array&&1<u.length)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+Da);switch(u[0]){case 1:d.push(Da);b.push(l.yytext);f.push(l.yylloc);d.push(u[1]);Da=null;p?(Da=p,p=null):(e=l.yyleng,L=l.yytext,c=l.yylineno,n=l.yylloc,0<h&&h--);break;case 2:r=this.productions_[u[1]][1];t.$=b[b.length-r];t._$={first_line:f[f.length-(r||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-
(r||1)].first_column,last_column:f[f.length-1].last_column};k&&(t._$.range=[f[f.length-(r||1)].range[0],f[f.length-1].range[1]]);m=this.performAction.apply(t,[L,e,c,Wa,u[1],b,f].concat(g));if("undefined"!==typeof m)return m;r&&(d=d.slice(0,-2*r),b=b.slice(0,-1*r),f=f.slice(0,-1*r));d.push(this.productions_[u[1]][0]);b.push(t.$);f.push(t._$);u=v[d[d.length-2]][d[d.length-1]];d.push(u);break;case 3:return!0}}}};k.prototype=ic;ic.Parser=k;return new k}();"undefined"!==typeof q&&"undefined"!==typeof k&&
(k.parser=sa,k.Parser=sa.Parser,k.parse=function(){return sa.parse.apply(sa,arguments)},k.main=function(ha){ha[1]||(console.log("Usage: "+ha[0]+" FILE"),process.exit(1));var a="",g=q("fs");"undefined"!==typeof g&&null!==g&&(a=g.readFileSync(q("path").normalize(ha[1]),"utf8"));return k.parser.parse(a)},"undefined"!==typeof xa&&q.main===xa&&k.main(process.argv.slice(1)));return xa.exports}();q["./scope"]=function(){var k={};(function(){var q=[].indexOf||function(k){for(var a=0,g=this.length;a<g;a++)if(a in
this&&this[a]===k)return a;return-1},sa=function(k,a,g,q){var m,c;this.parent=k;this.expressions=a;this.method=g;this.referencedVars=q;this.variables=[{name:"arguments",type:"arguments"}];this.positions={};this.parent||(this.utilities={});this.root=null!=(m=null!=(c=this.parent)?c.root:void 0)?m:this};sa.prototype.add=function(k,a,g){return this.shared&&!g?this.parent.add(k,a,g):Object.prototype.hasOwnProperty.call(this.positions,k)?this.variables[this.positions[k]].type=a:this.positions[k]=this.variables.push({name:k,
type:a})-1};sa.prototype.namedMethod=function(){var k;return null!=(k=this.method)&&k.name||!this.parent?this.method:this.parent.namedMethod()};sa.prototype.find=function(k,a){a=void 0===a?"var":a;if(this.check(k))return!0;this.add(k,a);return!1};sa.prototype.parameter=function(k){if(!this.shared||!this.parent.check(k,!0))return this.add(k,"param")};sa.prototype.check=function(k){var a;return!!(this.type(k)||null!=(a=this.parent)&&a.check(k))};sa.prototype.temporary=function(k,a,g){return(void 0===
g?0:g)?(g=k.charCodeAt(0),k=122-g,g=String.fromCharCode(g+a%(k+1)),a=Math.floor(a/(k+1)),""+g+(a||"")):""+k+(a||"")};sa.prototype.type=function(k){var a,g,q,m;q=this.variables;a=0;for(g=q.length;a<g;a++)if(m=q[a],m.name===k)return m.type;return null};sa.prototype.freeVariable=function(k,a){a=void 0===a?{}:a;var g,ha,m;for(g=0;;){m=this.temporary(k,g,a.single);if(!(this.check(m)||0<=q.call(this.root.referencedVars,m)))break;g++}(null!=(ha=a.reserve)?ha:1)&&this.add(m,"var",!0);return m};sa.prototype.assign=
function(k,a){this.add(k,{value:a,assigned:!0},!0);return this.hasAssignments=!0};sa.prototype.hasDeclarations=function(){return!!this.declaredVariables().length};sa.prototype.declaredVariables=function(){var k,a,g,q,m;q=this.variables;m=[];a=0;for(g=q.length;a<g;a++)k=q[a],"var"===k.type&&m.push(k.name);return m.sort()};sa.prototype.assignedVariables=function(){var k,a,g,q,m;g=this.variables;q=[];k=0;for(a=g.length;k<a;k++)m=g[k],m.type.assigned&&q.push(m.name+" \x3d "+m.type.value);return q};k.Scope=
sa}).call(this);return k}();q["./nodes"]=function(){var k={};(function(){var xa,sa,ha,a,g,ta,m,c,e,y,D,w,z,l,E,A,B,J,p,ua,h,n,u,t,H,x,r,W,T,Q,R,M,U,O,P,G,C,Z,F,ca,S,V,K,aa,ba,Y,X,ra,Na,za,la,ma,I,ja,da,oa,ia,ka,pa,ea,N,qa,va,na,Rb,wa,Qa,Xa,Ha,Ya,cb,Ra,Ia,Fa=[].indexOf||function(a){for(var b=0,L=this.length;b<L;b++)if(b in this&&this[b]===a)return b;return-1},Ea=[].slice;Error.stackTraceLimit=Infinity;S=q("./scope").Scope;Xa=q("./lexer");na=Xa.isUnassignable;ua=Xa.JS_FORBIDDEN;Ha=q("./helpers");ia=
Ha.compact;ea=Ha.flatten;pa=Ha.extend;wa=Ha.merge;ka=Ha.del;oa=Ha.addLocationDataFn;Rb=Ha.locationDataToString;cb=Ha.throwSyntaxError;k.extend=pa;k.addLocationDataFn=oa;da=function(){return!0};M=function(){return!1};Na=function(){return this};R=function(){this.negated=!this.negated;return this};var Ba=function(a,v){var b;this.code=""+v;this.locationData=null!=a?a.locationData:void 0;this.type=(null!=a?null!=(b=a.constructor)?b.name:void 0:void 0)||"unknown"};Ba.prototype.toString=function(){return""+
this.code+(this.locationData?": "+Rb(this.locationData):"")};k.CodeFragment=Ba;N=function(a){var b,L,d,f;f=[];L=0;for(d=a.length;L<d;L++)b=a[L],f.push(b.code);return f.join("")};k.Base=a=function(){var a=function(){};a.prototype.compile=function(a,b){return N(this.compileToFragments(a,b))};a.prototype.compileToFragments=function(a,b){a=pa({},a);b&&(a.level=b);b=this.unfoldSoak(a)||this;b.tab=a.indent;return a.level!==x&&b.isStatement(a)?b.compileClosure(a):b.compileNode(a)};a.prototype.compileClosure=
function(a){var b,d,f,v,e;(f=this.jumps())&&f.error("cannot use a pure statement in an expression");a.sharedScope=!0;f=new c([],g.wrap([this]));b=[];if(this.contains(function(a){return a instanceof X}))f.bound=!0;else if((d=this.contains(qa))||this.contains(va))b=[new za],d?(d="apply",b.push(new A("arguments"))):d="call",f=new I(f,[new xa(new C(d))]);a=(new ta(f,b)).compileNode(a);switch(!1){case !(f.isGenerator||null!=(v=f.base)&&v.isGenerator):a.unshift(this.makeCode("(yield* "));a.push(this.makeCode(")"));
break;case !(f.isAsync||null!=(e=f.base)&&e.isAsync):a.unshift(this.makeCode("(await ")),a.push(this.makeCode(")"))}return a};a.prototype.cache=function(a,b,d){var f;if(null!=d?d(this):this.shouldCache())return d=new A(a.scope.freeVariable("ref")),f=new ha(d,this),b?[f.compileToFragments(a,b),[this.makeCode(d.value)]]:[f,d];d=b?this.compileToFragments(a,b):this;return[d,d]};a.prototype.hoist=function(){var a,b,d;this.hoisted=!0;d=new E(this);a=this.compileNode;b=this.compileToFragments;this.compileNode=
function(b){return d.update(a,b)};this.compileToFragments=function(a){return d.update(b,a)};return d};a.prototype.cacheToCodeFragments=function(a){return[N(a[0]),N(a[1])]};a.prototype.makeReturn=function(a){var b;b=this.unwrapAll();return a?new ta(new r(a+".push"),[b]):new F(b)};a.prototype.contains=function(a){var b;b=void 0;this.traverseChildren(!1,function(d){if(a(d))return b=d,!1});return b};a.prototype.lastNonComment=function(a){var b;for(b=a.length;b--;)if(!(a[b]instanceof e))return a[b];return null};
a.prototype.toString=function(a,b){a=void 0===a?"":a;b=void 0===b?this.constructor.name:b;var d;d="\n"+a+b;this.soak&&(d+="?");this.eachChild(function(b){return d+=b.toString(a+ra)});return d};a.prototype.eachChild=function(a){var b,d,f,v,c,e,h;if(!this.children)return this;e=this.children;d=0;for(v=e.length;d<v;d++)if(b=e[d],this[b])for(h=ea([this[b]]),f=0,c=h.length;f<c;f++)if(b=h[f],!1===a(b))return this;return this};a.prototype.traverseChildren=function(a,b){return this.eachChild(function(d){if(!1!==
b(d))return d.traverseChildren(a,b)})};a.prototype.replaceInContext=function(a,b){var d,f,v,L,c,e,h,g;if(!this.children)return!1;g=this.children;L=0;for(e=g.length;L<e;L++)if(d=g[L],f=this[d])if(Array.isArray(f))for(v=c=0,h=f.length;c<h;v=++c){d=f[v];if(a(d))return[].splice.apply(f,[v,v-v+1].concat(a=b(d,this))),a,!0;if(d.replaceInContext(a,b))return!0}else{if(a(f))return this[d]=b(f,this),!0;if(f.replaceInContext(a,b))return!0}};a.prototype.invert=function(){return new O("!",this)};a.prototype.unwrapAll=
function(){var a;for(a=this;a!==(a=a.unwrap()););return a};a.prototype.updateLocationDataIfMissing=function(a){if(this.locationData)return this;this.locationData=a;return this.eachChild(function(b){return b.updateLocationDataIfMissing(a)})};a.prototype.error=function(a){return cb(a,this.locationData)};a.prototype.makeCode=function(a){return new Ba(this,a)};a.prototype.wrapInBraces=function(a){return[].concat(this.makeCode("("),a,this.makeCode(")"))};a.prototype.joinFragmentArrays=function(a,b){var d,
f,L,v,c;d=[];L=v=0;for(c=a.length;v<c;L=++v)f=a[L],L&&d.push(this.makeCode(b)),d=d.concat(f);return d};a.prototype.children=[];a.prototype.isStatement=M;a.prototype.jumps=M;a.prototype.shouldCache=da;a.prototype.isChainable=M;a.prototype.isAssignable=M;a.prototype.isNumber=M;a.prototype.unwrap=Na;a.prototype.unfoldSoak=M;a.prototype.assigns=M;return a}();var Sa=function(b){var v;v=a.call(this)||this;v.source=b;v.options={};v.targetFragments={fragments:[]};return v};$jscomp.inherits(Sa,a);Sa.expand=
function(a){var b,L,d;for(L=d=a.length-1;0<=d;L=d+=-1)b=a[L],b.fragments&&([].splice.apply(a,[L,L-L+1].concat(b=this.expand(b.fragments))),b);return a};Sa.prototype.isStatement=function(a){return this.source.isStatement(a)};Sa.prototype.update=function(a,v){return this.targetFragments.fragments=a.call(this.source,wa(v,this.options))};Sa.prototype.compileToFragments=function(a,v){this.options.indent=a.indent;this.options.level=null!=v?v:a.level;return[this.targetFragments]};Sa.prototype.compileNode=
function(a){return this.compileToFragments(a)};Sa.prototype.compileClosure=function(a){return this.compileToFragments(a)};k.HoistTarget=E=Sa;k.Block=g=function(){var b=function(b){var L;L=a.call(this)||this;L.expressions=ia(ea(b||[]));return L};$jscomp.inherits(b,a);b.prototype.push=function(a){this.expressions.push(a);return this};b.prototype.pop=function(){return this.expressions.pop()};b.prototype.unshift=function(a){this.expressions.unshift(a);return this};b.prototype.unwrap=function(){return 1===
this.expressions.length?this.expressions[0]:this};b.prototype.isEmpty=function(){return!this.expressions.length};b.prototype.isStatement=function(a){var b,d,f,v;v=this.expressions;d=0;for(f=v.length;d<f;d++)if(b=v[d],b.isStatement(a))return!0;return!1};b.prototype.jumps=function(a){var b,d,f,v;v=this.expressions;d=0;for(f=v.length;d<f;d++)if(b=v[d],b=b.jumps(a))return b};b.prototype.makeReturn=function(a){var b,d;for(d=this.expressions.length;d--;)if(b=this.expressions[d],!(b instanceof e)){this.expressions[d]=
b.makeReturn(a);b instanceof F&&!b.expression&&this.expressions.splice(d,1);break}return this};b.prototype.compileToFragments=function(b,L){b=void 0===b?{}:b;return b.scope?a.prototype.compileToFragments.call(this,b,L):this.compileRoot(b)};b.prototype.compileNode=function(a){var L,d,f,v,c,e,h;this.tab=a.indent;h=a.level===x;d=[];e=this.expressions;f=L=0;for(v=e.length;L<v;f=++L)c=e[f],c=c.unwrapAll(),c=c.unfoldSoak(a)||c,c instanceof b?d.push(c.compileNode(a)):c.hoisted?c.compileToFragments(a):h?
(c.front=!0,f=c.compileToFragments(a),c.isStatement(a)||(f.unshift(this.makeCode(""+this.tab)),f.push(this.makeCode(";"))),d.push(f)):d.push(c.compileToFragments(a,u));if(h)return this.spaced?[].concat(this.joinFragmentArrays(d,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(d,"\n");L=d.length?this.joinFragmentArrays(d,", "):[this.makeCode("void 0")];return 1<d.length&&a.level>=u?this.wrapInBraces(L):L};b.prototype.compileRoot=function(a){var b,d,f,v,c;a.indent=a.bare?"":ra;a.level=x;this.spaced=
!0;a.scope=new S(null,this,null,null!=(f=a.referencedVars)?f:[]);c=a.locals||[];f=0;for(d=c.length;f<d;f++)v=c[f],a.scope.parameter(v);f=[];if(!a.bare){var h;h=this.expressions;d=[];b=v=0;for(c=h.length;v<c;b=++v){b=h[b];if(!(b.unwrap()instanceof e))break;d.push(b)}v=this.expressions.slice(d.length);this.expressions=d;d.length&&(f=this.compileNode(wa(a,{indent:""})),f.push(this.makeCode("\n")));this.expressions=v}d=this.compileWithDeclarations(a);E.expand(d);return a.bare?d:[].concat(f,this.makeCode("(function() {\n"),
d,this.makeCode("\n}).call(this);\n"))};b.prototype.compileWithDeclarations=function(a){var b,d,f,v,c,h;f=[];h=this.expressions;v=c=0;for(b=h.length;c<b&&(d=h[v],d=d.unwrap(),d instanceof e||d instanceof r);v=++c);a=wa(a,{level:x});v&&(d=this.expressions.splice(v,9E9),f=[this.spaced,!1],c=f[0],this.spaced=f[1],c=[this.compileNode(a),c],f=c[0],this.spaced=c[1],this.expressions=d);d=this.compileNode(a);c=a.scope;c.expressions===this&&(b=a.scope.hasDeclarations(),a=c.hasAssignments,b||a?(v&&f.push(this.makeCode("\n")),
f.push(this.makeCode(this.tab+"var ")),b&&f.push(this.makeCode(c.declaredVariables().join(", "))),a&&(b&&f.push(this.makeCode(",\n"+(this.tab+ra))),f.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+ra))))),f.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):f.length&&d.length&&f.push(this.makeCode("\n")));return f.concat(d)};b.wrap=function(a){return 1===a.length&&a[0]instanceof b?a[0]:new b(a)};b.prototype.children=["expressions"];return b}();k.Literal=r=function(){var b=function(b){var L;
L=a.call(this)||this;L.value=b;return L};$jscomp.inherits(b,a);b.prototype.assigns=function(a){return a===this.value};b.prototype.compileNode=function(a){return[this.makeCode(this.value)]};b.prototype.toString=function(){return" "+(this.isStatement()?a.prototype.toString.call(this):this.constructor.name)+": "+this.value};b.prototype.shouldCache=M;return b}();var Ta=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(Ta,r);k.NumberLiteral=Ta;var db=function(a){return Ta.apply(this,arguments)||
this};$jscomp.inherits(db,Ta);db.prototype.compileNode=function(){return[this.makeCode("2e308")]};k.InfinityLiteral=db;var Ja=function(){return Ta.call(this,"NaN")||this};$jscomp.inherits(Ja,Ta);Ja.prototype.compileNode=function(a){var b;b=[this.makeCode("0/0")];return a.level>=t?this.wrapInBraces(b):b};k.NaNLiteral=Ja;var Ma=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(Ma,r);k.StringLiteral=Ma;var Ca=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(Ca,r);k.RegexLiteral=
Ca;var ga=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(ga,r);k.PassthroughLiteral=ga;k.IdentifierLiteral=A=function(){var a=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(a,r);a.prototype.isAssignable=da;return a}();k.PropertyName=C=function(){var a=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(a,r);a.prototype.isAssignable=da;return a}();k.StatementLiteral=aa=function(){var a=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(a,
r);a.prototype.jumps=function(a){if("break"===this.value&&!(null!=a&&a.loop||null!=a&&a.block)||"continue"===this.value&&(null==a||!a.loop))return this};a.prototype.compileNode=function(a){return[this.makeCode(""+this.tab+this.value+";")]};a.prototype.isStatement=da;a.prototype.makeReturn=Na;return a}();var fa=function(){return r.call(this,"this")||this};$jscomp.inherits(fa,r);fa.prototype.compileNode=function(a){var b;a=null!=(b=a.scope.method)&&b.bound?a.scope.method.context:this.value;return[this.makeCode(a)]};
k.ThisLiteral=za=fa;var Ua=function(){return r.call(this,"undefined")||this};$jscomp.inherits(Ua,r);Ua.prototype.compileNode=function(a){return[this.makeCode(a.level>=h?"(void 0)":"void 0")]};k.UndefinedLiteral=Ua;var ya=function(){return r.call(this,"null")||this};$jscomp.inherits(ya,r);k.NullLiteral=ya;var gb=function(a){return r.apply(this,arguments)||this};$jscomp.inherits(gb,r);k.BooleanLiteral=gb;k.Return=F=function(){var b=function(b){var L;L=a.call(this)||this;L.expression=b;return L};$jscomp.inherits(b,
a);b.prototype.compileToFragments=function(v,L){var d,f;d=null!=(f=this.expression)?f.makeReturn():void 0;return!d||d instanceof b?a.prototype.compileToFragments.call(this,v,L):d.compileToFragments(v,L)};b.prototype.compileNode=function(a){var b;b=[];b.push(this.makeCode(this.tab+("return"+(this.expression?" ":""))));this.expression&&(b=b.concat(this.expression.compileToFragments(a,H)));b.push(this.makeCode(";"));return b};b.prototype.children=["expression"];b.prototype.isStatement=da;b.prototype.makeReturn=
Na;b.prototype.jumps=Na;return b}();var eb=function(a){return F.apply(this,arguments)||this};$jscomp.inherits(eb,F);eb.prototype.compileNode=function(a){null==a.scope.parent&&this.error("yield can only occur inside functions");return F.prototype.compileNode.call(this,a)};k.YieldReturn=eb;var fb=function(a){return F.apply(this,arguments)||this};$jscomp.inherits(fb,F);fb.prototype.compileNode=function(a){null==a.scope.parent&&this.error("await can only occur inside functions");return F.prototype.compileNode.call(this,
a)};k.AwaitReturn=fb;k.Value=I=function(){var b=function(v,L,d){var f;if(!L&&v instanceof b)return v;f=a.call(this)||this;f.base=v;f.properties=L||[];d&&(f[d]=!0);return f};$jscomp.inherits(b,a);b.prototype.add=function(a){this.properties=this.properties.concat(a);return this};b.prototype.hasProperties=function(){return!!this.properties.length};b.prototype.bareLiteral=function(a){return!this.properties.length&&this.base instanceof a};b.prototype.isArray=function(){return this.bareLiteral(sa)};b.prototype.isRange=
function(){return this.bareLiteral(Z)};b.prototype.shouldCache=function(){return this.hasProperties()||this.base.shouldCache()};b.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()};b.prototype.isNumber=function(){return this.bareLiteral(Ta)};b.prototype.isString=function(){return this.bareLiteral(Ma)};b.prototype.isRegex=function(){return this.bareLiteral(Ca)};b.prototype.isUndefined=function(){return this.bareLiteral(Ua)};b.prototype.isNull=function(){return this.bareLiteral(ya)};
b.prototype.isBoolean=function(){return this.bareLiteral(gb)};b.prototype.isAtomic=function(){var a,b,d,f;f=this.properties.concat(this.base);a=0;for(b=f.length;a<b;a++)if(d=f[a],d.soak||d instanceof ta)return!1;return!0};b.prototype.isNotCallable=function(){return this.isNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()||this.isUndefined()||this.isNull()||this.isBoolean()};b.prototype.isStatement=function(a){return!this.properties.length&&
this.base.isStatement(a)};b.prototype.assigns=function(a){return!this.properties.length&&this.base.assigns(a)};b.prototype.jumps=function(a){return!this.properties.length&&this.base.jumps(a)};b.prototype.isObject=function(a){return this.properties.length?!1:this.base instanceof U&&(!a||this.base.generated)};b.prototype.isSplice=function(){var a;a=this.properties;return a[a.length-1]instanceof V};b.prototype.looksStatic=function(a){var b;return(this["this"]||this.base instanceof za||this.base.value===
a)&&1===this.properties.length&&"prototype"!==(null!=(b=this.properties[0].name)?b.value:void 0)};b.prototype.unwrap=function(){return this.properties.length?this:this.base};b.prototype.cacheReference=function(a){var L,d,f,c;L=this.properties;f=L[L.length-1];if(2>this.properties.length&&!this.base.shouldCache()&&(null==f||!f.shouldCache()))return[this,this];L=new b(this.base,this.properties.slice(0,-1));L.shouldCache()&&(d=new A(a.scope.freeVariable("base")),L=new b(new G(new ha(d,L))));if(!f)return[L,
d];f.shouldCache()&&(c=new A(a.scope.freeVariable("name")),f=new p(new ha(c,f.index)),c=new p(c));return[L.add(f),new b(d||L.base,[c||f])]};b.prototype.compileNode=function(a){var b,d,f,c,v;this.base.front=this.front;v=this.properties;b=this.base.compileToFragments(a,v.length?h:null);v.length&&ca.test(N(b))&&b.push(this.makeCode("."));d=0;for(f=v.length;d<f;d++)c=v[d],b.push.apply(b,[].concat($jscomp.arrayFromIterable(c.compileToFragments(a))));return b};b.prototype.unfoldSoak=function(a){var L=this;
return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(){var d,f,c,v,e;if(f=L.base.unfoldSoak(a))return f.body.properties.push.apply(f.body.properties,[].concat($jscomp.arrayFromIterable(L.properties))),f;e=L.properties;f=d=0;for(c=e.length;d<c;f=++d)if(v=e[f],v.soak)return v.soak=!1,d=new b(L.base,L.properties.slice(0,f)),c=new b(L.base,L.properties.slice(f)),d.shouldCache()&&(f=new A(a.scope.freeVariable("ref")),d=new G(new ha(f,d)),c.base=f),new B(new D(d),c,{soak:!0});return!1}()};
b.prototype.children=["base","properties"];return b}();k.Comment=e=function(){var b=function(b){var L;L=a.call(this)||this;L.comment=b;return L};$jscomp.inherits(b,a);b.prototype.compileNode=function(a,b){var d;d=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *");d="/*"+Qa(d,this.tab)+(0<=Fa.call(d,"\n")?"\n"+this.tab:"")+" */";(b||a.level)===x&&(d=a.indent+d);return[this.makeCode("\n"),this.makeCode(d)]};b.prototype.isStatement=da;b.prototype.makeReturn=Na;return b}();k.Call=ta=function(){var b=function(b,
L,d){var f;L=void 0===L?[]:L;f=a.call(this)||this;f.variable=b;f.args=L;f.soak=d;f.isNew=!1;f.variable instanceof I&&f.variable.isNotCallable()&&f.variable.error("literal is not a function");return f};$jscomp.inherits(b,a);b.prototype.updateLocationDataIfMissing=function(b){var L,d;this.locationData&&this.needsUpdatedStartLocation&&(this.locationData.first_line=b.first_line,this.locationData.first_column=b.first_column,L=(null!=(d=this.variable)?d.base:void 0)||this.variable,L.needsUpdatedStartLocation&&
(this.variable.locationData.first_line=b.first_line,this.variable.locationData.first_column=b.first_column,L.updateLocationDataIfMissing(b)),delete this.needsUpdatedStartLocation);return a.prototype.updateLocationDataIfMissing.call(this,b)};b.prototype.newInstance=function(){var a,L;a=(null!=(L=this.variable)?L.base:void 0)||this.variable;a instanceof b&&!a.isNew?a.newInstance():this.isNew=!0;this.needsUpdatedStartLocation=!0;return this};b.prototype.unfoldSoak=function(a){var L,d,f,c,v;if(this.soak){if(this.variable instanceof
Y)L=new r(this.variable.compile(a)),d=new I(L),null==this.variable.accessor&&this.variable.error("Unsupported reference to 'super'");else{if(d=Ra(a,this,"variable"))return d;d=(new I(this.variable)).cacheReference(a);L=d[0];d=d[1]}d=new b(d,this.args);d.isNew=this.isNew;L=new r("typeof "+L.compile(a)+' \x3d\x3d\x3d "function"');return new B(L,new I(d),{soak:!0})}L=this;for(f=[];;)if(L.variable instanceof b)f.push(L),L=L.variable;else{if(!(L.variable instanceof I))break;f.push(L);if(!((L=L.variable.base)instanceof
b))break}v=f.reverse();f=0;for(c=v.length;f<c;f++)L=v[f],d&&(L.variable instanceof b?L.variable=d:L.variable.base=d),d=Ra(a,L,"variable");return d};b.prototype.compileNode=function(a){var b,d,f,c,v,e;null!=(f=this.variable)&&(f.front=this.front);f=[];e=this.args;d=c=0;for(v=e.length;c<v;d=++c)b=e[d],d&&f.push(this.makeCode(", ")),f.push.apply(f,[].concat($jscomp.arrayFromIterable(b.compileToFragments(a,u))));b=[];this.isNew&&(this.variable instanceof Y&&this.variable.error("Unsupported reference to 'super'"),
b.push(this.makeCode("new ")));b.push.apply(b,[].concat($jscomp.arrayFromIterable(this.variable.compileToFragments(a,h))));b.push.apply(b,[].concat([this.makeCode("(")],$jscomp.arrayFromIterable(f),[this.makeCode(")")]));return b};b.prototype.children=["variable","args"];return b}();k.SuperCall=X=function(){var a=function(a){return ta.apply(this,arguments)||this};$jscomp.inherits(a,ta);a.prototype.isStatement=function(a){var b;return(null!=(b=this.expressions)?b.length:void 0)&&a.level===x};a.prototype.compileNode=
function(a){var b,d,f;if(null==(d=this.expressions)||!d.length)return ta.prototype.compileNode.call(this,a);f=new r(N(ta.prototype.compileNode.call(this,a)));d=new g(this.expressions.slice());a.level>x&&(b=f.cache(a,null,da),f=b[0],b=b[1],d.push(b));d.unshift(f);return d.compileToFragments(a,a.level===x?a.level:u)};a.prototype.children=ta.prototype.children.concat(["expressions"]);return a}();k.Super=Y=function(){var b=function(b){var c;c=a.call(this)||this;c.accessor=b;return c};$jscomp.inherits(b,
a);b.prototype.compileNode=function(a){var b,d;b=a.scope.namedMethod();null!=b&&b.isMethod||this.error("cannot use super outside of an instance method");this.inCtor=!!b.ctor;if(!this.inCtor&&null==this.accessor){b=b.name;if(b.shouldCache()||b instanceof p&&b.index.isAssignable())d=new A(a.scope.parent.freeVariable("name")),b.index=new ha(d,b.index);this.accessor=null!=d?new p(d):b}return(new I(new r("super"),this.accessor?[this.accessor]:[])).compileToFragments(a)};b.prototype.children=["accessor"];
return b}();var Oa=function(a){a=void 0===a?[]:a;return ta.call(this,new I(new A("RegExp")),a,!1)||this};$jscomp.inherits(Oa,ta);k.RegexWithInterpolations=Oa;var hb=function(a,c,L){c instanceof Ma&&(c=new ba(g.wrap([new I(c)])));return ta.call(this,a,[c],L)||this};$jscomp.inherits(hb,ta);hb.prototype.compileNode=function(a){return this.variable.compileToFragments(a,h).concat(this.args[0].compileToFragments(a,u))};k.TaggedTemplateCall=hb;k.Extends=function(){var b=function(b,c){var d;d=a.call(this)||
this;d.child=b;d.parent=c;return d};$jscomp.inherits(b,a);b.prototype.compileToFragments=function(a){return(new ta(new I(new r(Ia("extend",a))),[this.child,this.parent])).compileToFragments(a)};b.prototype.children=["child","parent"];return b}();k.Access=xa=function(){var b=function(b,c){var d;d=a.call(this)||this;d.name=b;d.soak="soak"===c;return d};$jscomp.inherits(b,a);b.prototype.compileToFragments=function(a){var b,d;a=this.name.compileToFragments(a);b=this.name.unwrap();return b instanceof C?
(d=b.value,0<=Fa.call(ua,d))?[].concat([this.makeCode('["')],$jscomp.arrayFromIterable(a),[this.makeCode('"]')]):[].concat([this.makeCode(".")],$jscomp.arrayFromIterable(a)):[].concat([this.makeCode("[")],$jscomp.arrayFromIterable(a),[this.makeCode("]")])};b.prototype.children=["name"];b.prototype.shouldCache=M;return b}();k.Index=p=function(){var b=function(b){var c;c=a.call(this)||this;c.index=b;return c};$jscomp.inherits(b,a);b.prototype.compileToFragments=function(a){return[].concat(this.makeCode("["),
this.index.compileToFragments(a,H),this.makeCode("]"))};b.prototype.shouldCache=function(){return this.index.shouldCache()};b.prototype.children=["index"];return b}();k.Range=Z=function(){var b=function(b,c,d){var f;f=a.call(this)||this;f.from=b;f.to=c;f.exclusive="exclusive"===d;f.equals=f.exclusive?"":"\x3d";return f};$jscomp.inherits(b,a);b.prototype.compileVariables=function(a){var b,d;a=wa(a,{top:!0});d=ka(a,"shouldCache");b=this.cacheToCodeFragments(this.from.cache(a,u,d));this.fromC=b[0];this.fromVar=
b[1];b=this.cacheToCodeFragments(this.to.cache(a,u,d));this.toC=b[0];this.toVar=b[1];if(b=ka(a,"step"))a=this.cacheToCodeFragments(b.cache(a,u,d)),this.step=a[0],this.stepVar=a[1];this.fromNum=this.from.isNumber()?Number(this.fromVar):null;this.toNum=this.to.isNumber()?Number(this.toVar):null;return this.stepNum=null!=b&&b.isNumber()?Number(this.stepVar):null};b.prototype.compileNode=function(a){var b,d,f,c,v,e,h,g,l,k;this.fromVar||this.compileVariables(a);if(!a.index)return this.compileArray(a);
e=null!=this.fromNum&&null!=this.toNum;v=ka(a,"index");h=(a=ka(a,"name"))&&a!==v;k=v+" \x3d "+this.fromC;this.toC!==this.toVar&&(k+=", "+this.toC);this.step!==this.stepVar&&(k+=", "+this.step);c=[v+" \x3c"+this.equals,v+" \x3e"+this.equals];d=c[0];c=c[1];d=null!=this.stepNum?0<this.stepNum?d+" "+this.toVar:c+" "+this.toVar:e?(g=[this.fromNum,this.toNum],f=g[0],l=g[1],g,f<=l?d+" "+l:c+" "+l):(b=this.stepVar?this.stepVar+" \x3e 0":this.fromVar+" \x3c\x3d "+this.toVar,b+" ? "+d+" "+this.toVar+" : "+
c+" "+this.toVar);b=this.stepVar?v+" +\x3d "+this.stepVar:e?h?f<=l?"++"+v:"--"+v:f<=l?v+"++":v+"--":h?b+" ? ++"+v+" : --"+v:b+" ? "+v+"++ : "+v+"--";h&&(k=a+" \x3d "+k);h&&(b=a+" \x3d "+b);return[this.makeCode(k+"; "+d+"; "+b)]};b.prototype.compileArray=function(a){var b,d,f,c,v,e,h,g,l;if((d=null!=this.fromNum&&null!=this.toNum)&&20>=Math.abs(this.fromNum-this.toNum))return b=function(){g=[];for(var a=e=this.fromNum,d=this.toNum;e<=d?a<=d:a>=d;e<=d?a++:a--)g.push(a);return g}.apply(this),this.exclusive&&
b.pop(),[this.makeCode("["+b.join(", ")+"]")];c=this.tab+ra;f=a.scope.freeVariable("i",{single:!0});h=a.scope.freeVariable("results");v="\n"+c+h+" \x3d [];";d?(a.index=f,d=N(this.compileNode(a))):(l=f+" \x3d "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),d=this.fromVar+" \x3c\x3d "+this.toVar,d="var "+l+"; "+d+" ? "+f+" \x3c"+this.equals+" "+this.toVar+" : "+f+" \x3e"+this.equals+" "+this.toVar+"; "+d+" ? "+f+"++ : "+f+"--");f="{ "+h+".push("+f+"); }\n"+c+"return "+h+";\n"+a.indent;a=function(a){return null!=
a?a.contains(qa):void 0};if(a(this.from)||a(this.to))b=", arguments";return[this.makeCode("(function() {"+v+"\n"+c+"for ("+d+")"+f+"}).apply(this"+(null!=b?b:"")+")")]};b.prototype.children=["from","to"];return b}();k.Slice=V=function(){var b=function(b){var c;c=a.call(this)||this;c.range=b;return c};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d,f,c,v;b=this.range;c=b.to;f=(b=b.from)&&b.compileToFragments(a,H)||[this.makeCode("0")];c&&(b=c.compileToFragments(a,H),d=N(b),this.range.exclusive||
-1!==+d)&&(v=", "+(this.range.exclusive?d:c.isNumber()?""+(+d+1):(b=c.compileToFragments(a,h),"+"+N(b)+" + 1 || 9e9")));return[this.makeCode(".slice("+N(f)+(v||"")+")")]};b.prototype.children=["range"];return b}();k.Obj=U=function(){var b=function(b,c){var d;c=void 0===c?!1:c;d=a.call(this)||this;d.generated=c;d.objects=d.properties=b||[];return d};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d,f,c,v,h,g,l,k,n;k=this.properties;if(this.generated)for(b=0,f=k.length;b<f;b++)v=k[b],
v instanceof I&&v.error("cannot have an implicit value in an implicit object");f=a.indent+=ra;g=this.lastNonComment(this.properties);b=[];b.push(this.makeCode("{"+(0===k.length?"}":"\n")));d=v=0;for(l=k.length;v<l;d=++v)h=k[d],c=d===k.length-1?"":h===g||h instanceof e?"\n":",\n",d=h instanceof e?"":f,h instanceof ha&&("object"!==h.context&&h.operatorToken.error("unexpected "+h.operatorToken.value),h.variable instanceof I&&h.variable.hasProperties()&&h.variable.error("invalid object key")),h instanceof
I&&h["this"]&&(h=new ha(h.properties[0].name,h,"object")),h instanceof e||h instanceof ha||(h.shouldCache()?(n=h.base.cache(a),h=n[0],n=n[1],h instanceof A&&(h=new C(h.value)),h=new ha(h,n,"object")):h=new ha(h,h,"object")),d&&b.push(this.makeCode(d)),b.push.apply(b,[].concat($jscomp.arrayFromIterable(h.compileToFragments(a,x)))),c&&b.push(this.makeCode(c));0!==k.length&&b.push(this.makeCode("\n"+this.tab+"}"));return this.front?this.wrapInBraces(b):b};b.prototype.assigns=function(a){var b,d,f,c;
c=this.properties;b=0;for(d=c.length;b<d;b++)if(f=c[b],f.assigns(a))return!0;return!1};b.prototype.children=["properties"];return b}();k.Arr=sa=function(){var b=function(b){var c;c=a.call(this)||this;c.objects=b||[];return c};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d,f,c,v;if(!this.objects.length)return[this.makeCode("[]")];a.indent+=ra;b=[];var e;v=this.objects;e=[];f=0;for(c=v.length;f<c;f++)d=v[f],e.push(d.compileToFragments(a,u));f=c=0;for(v=e.length;c<v;f=++c)d=e[f],f&&
b.push(this.makeCode(", ")),b.push.apply(b,[].concat($jscomp.arrayFromIterable(d)));0<=N(b).indexOf("\n")?(b.unshift(this.makeCode("[\n"+a.indent)),b.push(this.makeCode("\n"+this.tab+"]"))):(b.unshift(this.makeCode("[")),b.push(this.makeCode("]")));return b};b.prototype.assigns=function(a){var b,d,f,c;c=this.objects;b=0;for(d=c.length;b<d;b++)if(f=c[b],f.assigns(a))return!0;return!1};b.prototype.children=["objects"];return b}();k.Class=m=function(){var b=function(b,c,d){var f;d=void 0===d?new g:d;
f=a.call(this)||this;f.variable=b;f.parent=c;f.body=d;return f};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d;this.name=this.determineName();b=this.walkBody();this.parent instanceof I&&!this.parent.hasProperties()&&(d=this.parent.base.value);this.hasNameClash=null!=this.name&&this.name===d;b||this.hasNameClash?(this.compileNode=this.compileClassDeclaration,d=(new y(this,b)).compileToFragments(a),this.compileNode=this.constructor.prototype.compileNode):(d=this.compileClassDeclaration(a),
null==this.name&&a.level===x&&(d=this.wrapInBraces(d)));return this.variable?(b=new ha(this.variable,new r(""),null,{moduleDeclaration:this.moduleDeclaration}),[].concat($jscomp.arrayFromIterable(b.compileToFragments(a)),$jscomp.arrayFromIterable(d))):d};b.prototype.compileClassDeclaration=function(a){var b;(this.externalCtor||this.boundMethods.length)&&null==this.ctor&&(this.ctor=this.makeDefaultConstructor());null!=(b=this.ctor)&&(b.noReturn=!0);this.boundMethods.length&&this.proxyBoundMethods(a);
a.indent+=ra;b=[];b.push(this.makeCode("class "));this.name&&b.push(this.makeCode(this.name+" "));this.parent&&b.push.apply(b,[].concat([this.makeCode("extends ")],$jscomp.arrayFromIterable(this.parent.compileToFragments(a)),[this.makeCode(" ")]));b.push(this.makeCode("{"));this.body.isEmpty()||(this.body.spaced=!0,b.push(this.makeCode("\n")),b.push.apply(b,[].concat($jscomp.arrayFromIterable(this.body.compileToFragments(a,x)))),b.push(this.makeCode("\n"+this.tab)));b.push(this.makeCode("}"));return b};
b.prototype.determineName=function(){var a,b;if(!this.variable)return null;b=this.variable.properties;b=(a=b[b.length-1])?a instanceof xa&&a.name:this.variable.base;if(!(b instanceof A||b instanceof C))return null;b=b.value;a||(a=na(b))&&this.variable.error(a);return 0<=Fa.call(ua,b)?"_"+b:b};b.prototype.walkBody=function(){var a,b,d,f,h,l,k,n,m,p,u,t,r;this.ctor=null;this.boundMethods=[];k=[];f=this.body.expressions;l=0;t=f.slice();n=0;for(m=t.length;n<m;n++)if(d=t[n],d instanceof I&&d.isObject(!0)){p=
d.base.properties;h=[];r=b=0;for(u=function(){if(b>r)return h.push(new I(new U(p.slice(r,b),!0)))};a=p[b];)(a=this.addInitializerExpression(a))?(u(),h.push(a),k.push(a),r=b+1):k[k.length-1]instanceof e&&(h.pop(),k.pop(),r--),b++;u();[].splice.apply(f,[l,l-l+1].concat(h));h;l+=h.length}else(a=this.addInitializerExpression(d))?(k.push(a),f[l]=a):k[k.length-1]instanceof e&&k.pop(),l+=1;l=0;for(n=k.length;l<n;l++)m=k[l],m instanceof c&&(m.ctor?(this.ctor&&m.error("Cannot define more than one constructor in a class"),
this.ctor=m):m.bound&&m.isStatic?m.context=this.name:m.bound&&(this.boundMethods.push(m.name),m.bound=!1));if(k.length!==f.length)return this.body.expressions=function(){var a,b,f;f=[];a=0;for(b=k.length;a<b;a++)d=k[a],f.push(d.hoist());return f}(),new g(f)};b.prototype.addInitializerExpression=function(a){switch(!1){case !(a instanceof e):return a;case !this.validInitializerMethod(a):return this.addInitializerMethod(a);default:return null}};b.prototype.validInitializerMethod=function(a){return a instanceof
ha&&a.value instanceof c?"object"!==a.context||a.variable.hasProperties()?a.variable.looksStatic(this.name)&&(this.name||!a.value.bound):!0:!1};b.prototype.addInitializerMethod=function(a){var b;b=a.variable;a=a.value;a.isMethod=!0;a.isStatic=b.looksStatic(this.name);a.isStatic?a.name=b.properties[0]:(b=b.base,a.name=new (b.shouldCache()?p:xa)(b),a.name.updateLocationDataIfMissing(b.locationData),"constructor"===b.value&&(a.ctor=this.parent?"derived":"base"),a.bound&&a.ctor&&a.error("Cannot define a constructor as a bound function"));
return a};b.prototype.makeDefaultConstructor=function(){var a,b,d;d=this.addInitializerMethod(new ha(new I(new C("constructor")),new c));this.body.unshift(d);this.parent&&d.body.push(new X(new Y,[new K(new A("arguments"))]));this.externalCtor&&(b=new I(this.externalCtor,[new xa(new C("apply"))]),a=[new za,new A("arguments")],d.body.push(new ta(b,a)),d.body.makeReturn());return d};b.prototype.proxyBoundMethods=function(a){var b,d=this.ctor,f,c,e;c=this.boundMethods;e=[];for(f=c.length-1;0<=f;f+=-1)b=
c[f],b=(new I(new za,[b])).compile(a),e.push(new r(b+" \x3d "+Ia("bind",a)+"("+b+", this)"));d.thisAssignments=e;return null};b.prototype.children=["variable","parent","body"];return b}();k.ExecutableClassBody=y=function(){var b=function(b,c){var d;c=void 0===c?new g:c;d=a.call(this)||this;d["class"]=b;d.body=c;return d};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d,f,e,v,h;(f=this.body.jumps())&&f.error("Class bodies cannot contain pure statements");(d=this.body.contains(qa))&&
d.error("Class bodies shouldn't reference arguments");this.name=null!=(e=this["class"].name)?e:this.defaultClassVariableName;d=this.walkBody();this.setContext();f=new A(this.name);b=[];h=new c([],this.body);e=new G(new ta(h,b));this.body.spaced=!0;a.classScope=h.makeScope(a.scope);this["class"].hasNameClash&&(v=new A(a.classScope.freeVariable("superClass")),h.params.push(new P(v)),b.push(this["class"].parent),this["class"].parent=v);this.externalCtor&&(b=new A(a.classScope.freeVariable("ctor",{reserve:!1})),
this["class"].externalCtor=b,this.externalCtor.variable.base=b);this.name!==this["class"].name?this.body.expressions.unshift(new ha(new A(this.name),this["class"])):this.body.expressions.unshift(this["class"]);this.body.expressions.unshift.apply(this.body.expressions,[].concat($jscomp.arrayFromIterable(d)));this.body.push(f);return e.compileToFragments(a)};b.prototype.walkBody=function(){var a=this,b,d,f;b=[];for(f=0;(d=this.body.expressions[f])&&(d instanceof e||d instanceof I&&d.isString());)d.hoisted?
f++:b.push.apply(b,[].concat($jscomp.arrayFromIterable(this.body.expressions.splice(f,1))));this.traverseChildren(!1,function(b){var d,f,c,e,v,h;if(b instanceof m||b instanceof E)return!1;d=!0;if(b instanceof g){h=b.expressions;f=c=0;for(e=h.length;c<e;f=++c)v=h[f],v instanceof I&&v.isObject(!0)?(d=!1,b.expressions[f]=a.addProperties(v.base.properties)):v instanceof ha&&v.variable.looksStatic(a.name)&&(v.value.isStatic=!0);b.expressions=ea(b.expressions)}return d});return b};b.prototype.setContext=
function(){var a=this;return this.body.traverseChildren(!1,function(b){if(b instanceof za)return b.value=a.name;if(b instanceof c&&b.bound)return b.context=a.name})};b.prototype.addProperties=function(a){var b,d,f,v,h,g;g=[];v=0;for(h=a.length;v<h;v++)b=a[v],d=b.variable,d=null!=d?d.base:void 0,f=b.value,delete b.context,b instanceof e||("constructor"===d.value?(f instanceof c&&d.error("constructors must be defined at the top level of a class body"),b=this.externalCtor=new ha(new I,f)):b.variable["this"]?
b.value instanceof c&&(b.value.isStatic=!0):(d=new (d.shouldCache()?p:xa)(d),f=new xa(new C("prototype")),d=new I(new za,[f,d]),b.variable=d)),g.push(b);return ia(g)};b.prototype.children=["class","body"];b.prototype.defaultClassVariableName="_Class";return b}();k.ModuleDeclaration=W=function(){var b=function(b,c){var d;d=a.call(this)||this;d.clause=b;d.source=c;d.checkSource();return d};$jscomp.inherits(b,a);b.prototype.checkSource=function(){if(null!=this.source&&this.source instanceof ba)return this.source.error("the name of the module to be imported from must be an uninterpolated string")};
b.prototype.checkScope=function(a,b){if(0!==a.indent.length)return this.error(b+" statements must be at top-level scope")};b.prototype.children=["clause","source"];b.prototype.isStatement=da;b.prototype.jumps=Na;b.prototype.makeReturn=Na;return b}();var Za=function(a){return W.apply(this,arguments)||this};$jscomp.inherits(Za,W);Za.prototype.compileNode=function(a){var b,c;this.checkScope(a,"import");a.importedSymbols=[];b=[];b.push(this.makeCode(this.tab+"import "));null!=this.clause&&b.push.apply(b,
[].concat($jscomp.arrayFromIterable(this.clause.compileNode(a))));null!=(null!=(c=this.source)?c.value:void 0)&&(null!==this.clause&&b.push(this.makeCode(" from ")),b.push(this.makeCode(this.source.value)));b.push(this.makeCode(";"));return b};k.ImportDeclaration=Za;k.ImportClause=function(){var b=function(b,c){var d;d=a.call(this)||this;d.defaultBinding=b;d.namedImports=c;return d};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b;b=[];null!=this.defaultBinding&&(b.push.apply(b,[].concat($jscomp.arrayFromIterable(this.defaultBinding.compileNode(a)))),
null!=this.namedImports&&b.push(this.makeCode(", ")));null!=this.namedImports&&b.push.apply(b,[].concat($jscomp.arrayFromIterable(this.namedImports.compileNode(a))));return b};b.prototype.children=["defaultBinding","namedImports"];return b}();var Ga=function(a){return W.apply(this,arguments)||this};$jscomp.inherits(Ga,W);Ga.prototype.compileNode=function(a){var b,c;this.checkScope(a,"export");b=[];b.push(this.makeCode(this.tab+"export "));this instanceof z&&b.push(this.makeCode("default "));this instanceof
z||!(this.clause instanceof ha||this.clause instanceof m)||(this.clause instanceof m&&!this.clause.variable&&this.clause.error("anonymous classes cannot be exported"),b.push(this.makeCode("var ")),this.clause.moduleDeclaration="export");b=null!=this.clause.body&&this.clause.body instanceof g?b.concat(this.clause.compileToFragments(a,x)):b.concat(this.clause.compileNode(a));null!=(null!=(c=this.source)?c.value:void 0)&&b.push(this.makeCode(" from "+this.source.value));b.push(this.makeCode(";"));return b};
k.ExportDeclaration=Ga;var mb=function(a){return Ga.apply(this,arguments)||this};$jscomp.inherits(mb,Ga);k.ExportNamedDeclaration=mb;var La=function(a){return Ga.apply(this,arguments)||this};$jscomp.inherits(La,Ga);k.ExportDefaultDeclaration=z=La;var Ka=function(a){return Ga.apply(this,arguments)||this};$jscomp.inherits(Ka,Ga);k.ExportAllDeclaration=Ka;k.ModuleSpecifierList=Q=function(){var b=function(b){var c;c=a.call(this)||this;c.specifiers=b;return c};$jscomp.inherits(b,a);b.prototype.compileNode=
function(a){var b,d,f,c,e;b=[];a.indent+=ra;var h;e=this.specifiers;h=[];f=0;for(c=e.length;f<c;f++)d=e[f],h.push(d.compileToFragments(a,u));if(0!==this.specifiers.length){b.push(this.makeCode("{\n"+a.indent));f=c=0;for(e=h.length;c<e;f=++c)d=h[f],f&&b.push(this.makeCode(",\n"+a.indent)),b.push.apply(b,[].concat($jscomp.arrayFromIterable(d)));b.push(this.makeCode("\n}"))}else b.push(this.makeCode("{}"));return b};b.prototype.children=["specifiers"];return b}();var nb=function(a){return Q.apply(this,
arguments)||this};$jscomp.inherits(nb,Q);k.ImportSpecifierList=nb;var ob=function(a){return Q.apply(this,arguments)||this};$jscomp.inherits(ob,Q);k.ExportSpecifierList=ob;k.ModuleSpecifier=T=function(){var b=function(b,c,d){var f;f=a.call(this)||this;f.original=b;f.alias=c;f.moduleDeclarationType=d;f.identifier=null!=f.alias?f.alias.value:f.original.value;return f};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){a.scope.find(this.identifier,this.moduleDeclarationType);a=[];a.push(this.makeCode(this.original.value));
null!=this.alias&&a.push(this.makeCode(" as "+this.alias.value));return a};b.prototype.children=["original","alias"];return b}();var Va=function(a,c){return T.call(this,a,c,"import")||this};$jscomp.inherits(Va,T);Va.prototype.compileNode=function(a){var b;(b=this.identifier,0<=Fa.call(a.importedSymbols,b))||a.scope.check(this.identifier)?this.error("'"+this.identifier+"' has already been declared"):a.importedSymbols.push(this.identifier);return T.prototype.compileNode.call(this,a)};k.ImportSpecifier=
Va;var ib=function(a){return Va.apply(this,arguments)||this};$jscomp.inherits(ib,Va);k.ImportDefaultSpecifier=ib;var pb=function(a){return Va.apply(this,arguments)||this};$jscomp.inherits(pb,Va);k.ImportNamespaceSpecifier=pb;var qb=function(a,c){return T.call(this,a,c,"export")||this};$jscomp.inherits(qb,T);k.ExportSpecifier=qb;k.Assign=ha=function(){var b=function(b,c,d,f){var e;f=void 0===f?{}:f;e=a.call(this)||this;e.variable=b;e.value=c;e.context=d;e.param=f.param;e.subpattern=f.subpattern;e.operatorToken=
f.operatorToken;e.moduleDeclaration=f.moduleDeclaration;return e};$jscomp.inherits(b,a);b.prototype.isStatement=function(a){return(null!=a?a.level:void 0)===x&&null!=this.context&&(this.moduleDeclaration||0<=Fa.call(this.context,"?"))};b.prototype.checkAssignability=function(a,b){if(Object.prototype.hasOwnProperty.call(a.scope.positions,b.value)&&"import"===a.scope.variables[a.scope.positions[b.value]].type)return b.error("'"+b.value+"' is read-only")};b.prototype.assigns=function(a){return this["object"===
this.context?"value":"variable"].assigns(a)};b.prototype.unfoldSoak=function(a){return Ra(a,this,"variable")};b.prototype.compileNode=function(a){var b,d,f,e,h,v,g;if(d=this.variable instanceof I){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(a);if(this.variable.isSplice())return this.compileSplice(a);if("||\x3d"===(e=this.context)||"\x26\x26\x3d"===e||"?\x3d"===e)return this.compileConditional(a);if("**\x3d"===(h=this.context)||"//\x3d"===h||"%%\x3d"===h)return this.compileSpecialMath(a)}this.value instanceof
c&&(this.value.isStatic?this.value.name=this.variable.properties[0]:2<=(null!=(v=this.variable.properties)?v.length:void 0)&&(h=this.variable.properties,3<=h.length?Ea.call(h,0,f=h.length-2):f=0,e=h[f++],f=h[f++],"prototype"===(null!=(g=e.name)?g.value:void 0)&&(this.value.name=f)));this.context||(g=this.variable.unwrapAll(),g.isAssignable()||this.variable.error("'"+this.variable.compile(a)+"' can't be assigned"),"function"===typeof g.hasProperties&&g.hasProperties()||(this.moduleDeclaration?(this.checkAssignability(a,
g),a.scope.add(g.value,this.moduleDeclaration)):this.param?a.scope.add(g.value,"var"):(this.checkAssignability(a,g),a.scope.find(g.value))));g=this.value.compileToFragments(a,u);d&&this.variable.base instanceof U&&(this.variable.front=!0);d=this.variable.compileToFragments(a,u);if("object"===this.context){if(this.variable.shouldCache())d.unshift(this.makeCode("[")),d.push(this.makeCode("]"));else if(b=N(d),0<=Fa.call(ua,b))d.unshift(this.makeCode('"')),d.push(this.makeCode('"'));return d.concat(this.makeCode(": "),
g)}b=d.concat(this.makeCode(" "+(this.context||"\x3d")+" "),g);return a.level<=u?b:this.wrapInBraces(b)};b.prototype.compilePatternMatch=function(a){var c,d,f,e,h,v,g,l,k,n,m,q,H,y,z,B;y=a.level===x;l=this.value;q=this.variable.base.objects;if(!(H=q.length))return d=l.compileToFragments(a),a.level>=t?this.wrapInBraces(d):d;m=q[0];1===H&&m instanceof w&&m.error("Destructuring assignment has no target");v=this.variable.isObject();if(y&&1===H&&!(m instanceof K))return f=null,m instanceof b&&"object"===
m.context?(d=m,e=d.variable,h=e.base,m=d.value,m instanceof b&&(f=m.value,m=m.variable)):(m instanceof b&&(f=m.value,m=m.variable),h=v?m["this"]?m.properties[0].name:new C(m.unwrap().value):new Ta(0)),c=h.unwrap()instanceof C,l=new I(l),l.properties.push(new (c?xa:p)(h)),(n=na(m.unwrap().value))&&m.error(n),f&&(l=new O("?",l,f)),(new b(m,l,null,{param:this.param})).compileToFragments(a,x);z=l.compileToFragments(a,u);B=N(z);d=[];e=!1;l.unwrap()instanceof A&&!this.variable.assigns(B)||(d.push([].concat([this.makeCode((f=
a.scope.freeVariable("ref"))+" \x3d ")],$jscomp.arrayFromIterable(z))),z=[this.makeCode(f)],B=f);f=l=0;for(k=q.length;l<k;f=++l){m=q[f];h=f;if(!e&&m instanceof K)n=m.name.unwrap().value,m=m.unwrap(),h=H+" \x3c\x3d "+B+".length ? "+Ia("slice",a)+".call("+B+", "+f,(c=H-f-1)?(g=a.scope.freeVariable("i",{single:!0}),h+=", "+g+" \x3d "+B+".length - "+c+") : ("+g+" \x3d "+f+", [])"):h+=") : []",h=new r(h),e=g+"++";else if(!e&&m instanceof w){if(c=H-f-1)1===c?e=B+".length - 1":(g=a.scope.freeVariable("i",
{single:!0}),h=new r(g+" \x3d "+B+".length - "+c),e=g+"++",d.push(h.compileToFragments(a,u)));continue}else(m instanceof K||m instanceof w)&&m.error("multiple splats/expansions are disallowed in an assignment"),f=null,m instanceof b&&"object"===m.context?(h=m.variable,h=h.base,m=m.value,m instanceof b&&(f=m.value,m=m.variable)):(m instanceof b&&(f=m.value,m=m.variable),h=v?m["this"]?m.properties[0].name:new C(m.unwrap().value):new r(e||h)),n=m.unwrap().value,c=h.unwrap()instanceof C,h=new I(new r(B),
[new (c?xa:p)(h)]),f&&(h=new O("?",h,f));null!=n&&(n=na(n))&&m.error(n);d.push((new b(m,h,null,{param:this.param,subpattern:!0})).compileToFragments(a,u))}y||this.subpattern||d.push(z);d=this.joinFragmentArrays(d,", ");return a.level<u?d:this.wrapInBraces(d)};b.prototype.compileConditional=function(a){var c,d;d=this.variable.cacheReference(a);c=d[0];d=d[1];c.properties.length||!(c.base instanceof r)||c.base instanceof za||a.scope.check(c.base.value)||this.variable.error('the variable "'+c.base.value+
"\" can't be assigned with "+this.context+" because it has not been declared before");if(0<=Fa.call(this.context,"?"))return a.isExistentialEquals=!0,(new B(new D(c),d,{type:"if"})).addElse(new b(d,this.value,"\x3d")).compileToFragments(a);c=(new O(this.context.slice(0,-1),c,new b(d,this.value,"\x3d"))).compileToFragments(a);return a.level<=u?c:this.wrapInBraces(c)};b.prototype.compileSpecialMath=function(a){var c,d;d=this.variable.cacheReference(a);c=d[0];d=d[1];return(new b(c,new O(this.context.slice(0,
-1),d,this.value))).compileToFragments(a)};b.prototype.compileSplice=function(a){var b,d,f,c,e,g;c=this.variable.properties.pop().range;f=c.from;b=c.to;d=c.exclusive;g=this.variable.compile(a);f?(e=this.cacheToCodeFragments(f.cache(a,t)),c=e[0],e=e[1]):c=e="0";b?null!=f&&f.isNumber()&&b.isNumber()?(b=b.compile(a)-e,d||(b+=1)):(b=b.compile(a,h)+" - "+e,d||(b+=" + 1")):b="9e9";d=this.value.cache(a,u);f=d[0];d=d[1];b=[].concat(this.makeCode("[].splice.apply("+g+", ["+c+", "+b+"].concat("),f,this.makeCode(")), "),
d);return a.level>x?this.wrapInBraces(b):b};b.prototype.children=["variable","value"];return b}();k.Code=c=function(){var b=function(b,c,d){var f;f=a.call(this)||this;f.params=b||[];f.body=c||new g;f.bound="boundfunc"===d;f.isGenerator=!1;f.isAsync=!1;f.isMethod=!1;f.body.traverseChildren(!1,function(a){if(a instanceof O&&a.isYield()||a instanceof eb)f.isGenerator=!0;if(a instanceof O&&a.isAwait()||a instanceof fb)f.isAsync=!0;if(f.isGenerator&&f.isAsync)return a.error("function can't contain both yield and await")});
return f};$jscomp.inherits(b,a);b.prototype.isStatement=function(){return this.isMethod};b.prototype.makeScope=function(a){return new S(a,this.body,this)};b.prototype.compileNode=function(a){var b,d,f,c,e,g,v,l,k,n,m,p,u,t,r,x,q,H,y;this.ctor&&(this.isAsync&&this.name.error("Class constructor may not be async"),this.isGenerator&&this.name.error("Class constructor may not be a generator"));this.bound&&(null!=(b=a.scope.method)&&b.bound&&(this.context=a.scope.method.context),this.context||(this.context=
"this"));a.scope=ka(a,"classScope")||this.makeScope(a.scope);a.scope.shared=ka(a,"sharedScope");a.indent+=ra;delete a.bare;delete a.isExistentialEquals;b=[];c=[];y=null!=(g=null!=(e=this.thisAssignments)?e.slice():void 0)?g:[];q=[];e=g=!1;x=[];this.eachParamName(function(b,d,c){0<=Fa.call(x,b)&&d.error("multiple parameters named '"+b+"'");x.push(b);if(d["this"])return b=d.properties[0].name.value,0<=Fa.call(ua,b)&&(b="_"+b),b=new A(a.scope.freeVariable(b)),c.renameParam(d,b),y.push(new ha(d,b))});
H=this.params;f=l=0;for(n=H.length;l<n;f=++l)if(r=H[f],r.splat||r instanceof w)g?r.error("only one splat or expansion parameter is allowed per function definition"):r instanceof w&&1===this.params.length&&r.error("an expansion parameter cannot be the only parameter in a function definition"),g=!0,r.splat?(b.push(f=r.asReference(a)),m=N(f.compileNode(a)),r.shouldCache()&&c.push(new ha(new I(r.name),f,"\x3d",{param:!0}))):(m=a.scope.freeVariable("args"),b.push(new I(new A(m)))),a.scope.parameter(m);
else{if(r.shouldCache()||e)e=r.assignedInBody=!0,null!=r.value?(f=new O("\x3d\x3d",r,new Ua),v=new ha(new I(r.name),r.value,"\x3d",{param:!0}),c.push(new B(f,v))):c.push(new ha(new I(r.name),r.asReference(a),"\x3d",{param:!0}));g?(q.push(r),null==r.value||r.shouldCache()||(f=new O("\x3d\x3d",r,new Ua),v=new ha(new I(r.name),r.value,"\x3d"),c.push(new B(f,v))),null!=(null!=(k=r.name)?k.value:void 0)&&a.scope.add(r.name.value,"var",!0)):(f=r.shouldCache()?r.asReference(a):null==r.value||r.assignedInBody?
r:new ha(new I(r.name),r.value,"\x3d"),a.scope.parameter(N((null!=r.value?r:f).compileToFragments(a))),b.push(f))}0!==q.length&&c.unshift(new ha(new I(new sa([].concat([new K(new A(m))],$jscomp.arrayFromIterable(function(){var b,d,c;c=[];b=0;for(d=q.length;b<d;b++)r=q[b],c.push(r.asReference(a));return c}())))),new I(new A(m))));k=this.body.isEmpty();this.expandCtorSuper(y)||this.body.expressions.unshift.apply(this.body.expressions,[].concat($jscomp.arrayFromIterable(y)));this.body.expressions.unshift.apply(this.body.expressions,
[].concat($jscomp.arrayFromIterable(c)));k||this.noReturn||this.body.makeReturn();u=[];this.isMethod&&this.isStatic&&u.push("static");this.isAsync&&u.push("async");this.isMethod||this.bound?this.isGenerator&&u.push("*"):u.push("function"+(this.isGenerator?"*":""));c=[this.makeCode("(")];f=k=0;for(m=b.length;k<m;f=++k)r=b[f],f&&c.push(this.makeCode(", ")),g&&f===b.length-1&&c.push(this.makeCode("...")),c.push.apply(c,[].concat($jscomp.arrayFromIterable(r.compileToFragments(a))));c.push(this.makeCode(")"));
this.body.isEmpty()||(d=this.body.compileWithDeclarations(a));this.isMethod&&(t=[a.scope,a.scope.parent],b=t[0],a.scope=t[1],t=this.name.compileToFragments(a),"."===t[0].code&&t.shift(),a.scope=b);b=this.joinFragmentArrays(function(){var a,b,d;d=[];a=0;for(b=u.length;a<b;a++)p=u[a],d.push(this.makeCode(p));return d}.call(this)," ");u.length&&t&&b.push(this.makeCode(" "));t&&b.push.apply(b,[].concat($jscomp.arrayFromIterable(t)));b.push.apply(b,[].concat($jscomp.arrayFromIterable(c)));this.bound&&
!this.isMethod&&b.push(this.makeCode(" \x3d\x3e"));b.push(this.makeCode(" {"));null!=d&&d.length&&b.push.apply(b,[].concat([this.makeCode("\n")],$jscomp.arrayFromIterable(d),[this.makeCode("\n"+this.tab)]));b.push(this.makeCode("}"));return this.isMethod?[].concat([this.makeCode(this.tab)],$jscomp.arrayFromIterable(b)):this.front||a.level>=h?this.wrapInBraces(b):b};b.prototype.eachParamName=function(a){var b,d,c,e,h;e=this.params;h=[];b=0;for(d=e.length;b<d;b++)c=e[b],h.push(c.eachName(a));return h};
b.prototype.traverseChildren=function(b,c){if(b)return a.prototype.traverseChildren.call(this,b,c)};b.prototype.replaceInContext=function(b,c){return this.bound?a.prototype.replaceInContext.call(this,b,c):!1};b.prototype.expandCtorSuper=function(a){var b=this,d,c,e;if(!this.ctor)return!1;this.eachSuperCall(g.wrap(this.params),function(a){return a.error("'super' is not allowed in constructor parameter defaults")});e=this.eachSuperCall(this.body,function(d){"base"===b.ctor&&d.error("'super' is only allowed in derived class constructors");
return d.expressions=a});d=a.length&&a.length!==(null!=(c=this.thisAssignments)?c.length:void 0);"derived"===this.ctor&&!e&&d&&(d=a[0].variable,d.error("Can't use @params in derived class constructors without calling super"));return e};b.prototype.eachSuperCall=function(a,c){var d=this,f;f=!1;a.traverseChildren(!0,function(a){a instanceof X?(f=!0,c(a)):a instanceof za&&"derived"===d.ctor&&!f&&a.error("Can't reference 'this' before calling super in derived class constructors");return!(a instanceof
X)&&(!(a instanceof b)||a.bound)});return f};b.prototype.children=["params","body"];b.prototype.jumps=M;return b}();k.Param=P=function(){var b=function(b,c,d){var f;f=a.call(this)||this;f.name=b;f.value=c;f.splat=d;(b=na(f.name.unwrapAll().value))&&f.name.error(b);f.name instanceof U&&f.name.generated&&(b=f.name.objects[0].operatorToken,b.error("unexpected "+b.value));return f};$jscomp.inherits(b,a);b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a,u)};b.prototype.asReference=
function(a){var b;if(this.reference)return this.reference;b=this.name;b["this"]?(b=b.properties[0].name.value,0<=Fa.call(ua,b)&&(b="_"+b),b=new A(a.scope.freeVariable(b))):b.shouldCache()&&(b=new A(a.scope.freeVariable("arg")));b=new I(b);b.updateLocationDataIfMissing(this.locationData);return this.reference=b};b.prototype.shouldCache=function(){return this.name.shouldCache()};b.prototype.eachName=function(a,b){b=void 0===b?this.name:b;var d=this,c,e,h,g;c=function(b){return a("@"+b.properties[0].name.value,
b,d)};if(b instanceof r)return a(b.value,b,this);if(b instanceof I)return c(b);b=null!=(e=b.objects)?e:[];e=0;for(h=b.length;e<h;e++)g=b[e],g instanceof ha&&null==g.context&&(g=g.variable),g instanceof ha?(g.value instanceof ha&&(g=g.value),this.eachName(a,g.value.unwrap())):g instanceof K?(g=g.name.unwrap(),a(g.value,g,this)):g instanceof I?g.isArray()||g.isObject()?this.eachName(a,g.base):g["this"]?c(g):a(g.base.value,g.base,this):g instanceof w||g.error("illegal parameter "+g.compile())};b.prototype.renameParam=
function(a,b){return this.replaceInContext(function(b){return b===a},function(a,c){return c instanceof U?(c=a,a["this"]&&(c=a.properties[0].name),new ha(new I(c),b,"object")):b})};b.prototype.children=["name","value"];return b}();k.Splat=K=function(){var b=function(b){var c;c=a.call(this)||this;c.name=b.compile?b:new r(b);return c};$jscomp.inherits(b,a);b.prototype.assigns=function(a){return this.name.assigns(a)};b.prototype.compileToFragments=function(a){return[].concat([this.makeCode("...")],$jscomp.arrayFromIterable(this.name.compileToFragments(a)))};
b.prototype.unwrap=function(){return this.name};b.prototype.children=["name"];b.prototype.isAssignable=da;return b}();k.Expansion=w=function(){var b=function(b){return a.apply(this,arguments)||this};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){return this.error("Expansion must be used inside a destructuring assignment or parameter list")};b.prototype.asReference=function(a){return this};b.prototype.eachName=function(a){};b.prototype.shouldCache=M;return b}();k.While=ja=function(){var b=
function(b,c){var d;d=a.call(this)||this;d.condition=null!=c&&c.invert?b.invert():b;d.guard=null!=c?c.guard:void 0;return d};$jscomp.inherits(b,a);b.prototype.makeReturn=function(b){if(b)return a.prototype.makeReturn.call(this,b);this.returns=!this.jumps({loop:!0});return this};b.prototype.addBody=function(a){this.body=a;return this};b.prototype.jumps=function(){var a,b,d,c;a=this.body.expressions;if(!a.length)return!1;b=0;for(c=a.length;b<c;b++)if(d=a[b],d=d.jumps({loop:!0}))return d;return!1};b.prototype.compileNode=
function(a){var b,d,c;a.indent+=ra;c="";b=this.body;b.isEmpty()?b=this.makeCode(""):(this.returns&&(b.makeReturn(d=a.scope.freeVariable("results")),c=""+this.tab+d+" \x3d [];\n"),this.guard&&(1<b.expressions.length?b.expressions.unshift(new B((new G(this.guard)).invert(),new aa("continue"))):this.guard&&(b=g.wrap([new B(this.guard,b)]))),b=[].concat(this.makeCode("\n"),b.compileToFragments(a,x),this.makeCode("\n"+this.tab)));a=[].concat(this.makeCode(c+this.tab+"while ("),this.condition.compileToFragments(a,
H),this.makeCode(") {"),b,this.makeCode("}"));this.returns&&a.push(this.makeCode("\n"+this.tab+"return "+d+";"));return a};b.prototype.children=["condition","guard","body"];b.prototype.isStatement=da;return b}();k.Op=O=function(){var b,e,g=function(d,f,e,h){var l;if("in"===d)return new J(f,e);if("do"===d)return g.prototype.generateDo(f);if("new"===d){if(f instanceof ta&&!f["do"]&&!f.isNew)return f.newInstance();if(f instanceof c&&f.bound||f["do"])f=new G(f)}l=a.call(this)||this;l.operator=b[d]||d;
l.first=f;l.second=e;l.flip=!!h;return l};$jscomp.inherits(g,a);g.prototype.isNumber=function(){var a;return this.isUnary()&&("+"===(a=this.operator)||"-"===a)&&this.first instanceof I&&this.first.isNumber()};g.prototype.isAwait=function(){return"await"===this.operator};g.prototype.isYield=function(){var a;return"yield"===(a=this.operator)||"yield*"===a};g.prototype.isUnary=function(){return!this.second};g.prototype.shouldCache=function(){return!this.isNumber()};g.prototype.isChainable=function(){var a;
return"\x3c"===(a=this.operator)||"\x3e"===a||"\x3e\x3d"===a||"\x3c\x3d"===a||"\x3d\x3d\x3d"===a||"!\x3d\x3d"===a};g.prototype.invert=function(){var a,b,c;if(this.isChainable()&&this.first.isChainable()){a=!0;for(b=this;b&&b.operator;)a&&(a=b.operator in e),b=b.first;if(!a)return(new G(this)).invert();for(b=this;b&&b.operator;)b.invert=!b.invert,b.operator=e[b.operator],b=b.first;return this}return(b=e[this.operator])?(this.operator=b,this.first.unwrap()instanceof g&&this.first.invert(),this):this.second?
(new G(this)).invert():"!"===this.operator&&(a=this.first.unwrap())instanceof g&&("!"===(c=a.operator)||"in"===c||"instanceof"===c)?a:new g("!",this)};g.prototype.unfoldSoak=function(a){var b;return("++"===(b=this.operator)||"--"===b||"delete"===b)&&Ra(a,this,"first")};g.prototype.generateDo=function(a){var b,d,e,h,g;h=[];g=(a instanceof ha&&(b=a.value.unwrap())instanceof c?b:a).params||[];b=0;for(d=g.length;b<d;b++)e=g[b],e.value?(h.push(e.value),delete e.value):h.push(e);a=new ta(a,h);a["do"]=!0;
return a};g.prototype.compileNode=function(a){var b,d;b=this.isChainable()&&this.first.isChainable();b||(this.first.front=this.front);"delete"===this.operator&&a.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var");("--"===(d=this.operator)||"++"===d)&&(d=na(this.first.unwrapAll().value))&&this.first.error(d);if(this.isYield()||this.isAwait())return this.compileContinuation(a);if(this.isUnary())return this.compileUnary(a);if(b)return this.compileChain(a);
switch(this.operator){case "?":return this.compileExistence(a);case "**":return this.compilePower(a);case "//":return this.compileFloorDivision(a);case "%%":return this.compileModulo(a);default:return b=this.first.compileToFragments(a,t),d=this.second.compileToFragments(a,t),b=[].concat(b,this.makeCode(" "+this.operator+" "),d),a.level<=t?b:this.wrapInBraces(b)}};g.prototype.compileChain=function(a){var b;b=this.first.second.cache(a);this.first.second=b[0];b=b[1];a=this.first.compileToFragments(a,
t).concat(this.makeCode(" "+(this.invert?"\x26\x26":"||")+" "),b.compileToFragments(a),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(a,t));return this.wrapInBraces(a)};g.prototype.compileExistence=function(a){var b,d;this.first.shouldCache()?(d=new A(a.scope.freeVariable("ref")),b=new G(new ha(d,this.first))):d=b=this.first;return(new B(new D(b),d,{type:"if"})).addElse(this.second).compileToFragments(a)};g.prototype.compileUnary=function(a){var b,d,c;d=[];b=this.operator;d.push([this.makeCode(b)]);
if("!"===b&&this.first instanceof D)return this.first.negated=!this.first.negated,this.first.compileToFragments(a);if(a.level>=h)return(new G(this)).compileToFragments(a);c="+"===b||"-"===b;("new"===b||"typeof"===b||"delete"===b||c&&this.first instanceof g&&this.first.operator===b)&&d.push([this.makeCode(" ")]);if(c&&this.first instanceof g||"new"===b&&this.first.isStatement(a))this.first=new G(this.first);d.push(this.first.compileToFragments(a,t));this.flip&&d.reverse();return this.joinFragmentArrays(d,
"")};g.prototype.compileContinuation=function(a){var b,d,c,e;d=[];b=this.operator;null==a.scope.parent&&this.error(this.operator+" can only occur inside functions");null!=(c=a.scope.method)&&c.bound&&a.scope.method.isGenerator&&this.error("yield cannot occur inside bound (fat arrow) functions");0<=Fa.call(Object.keys(this.first),"expression")&&!(this.first instanceof la)?null!=this.first.expression&&d.push(this.first.expression.compileToFragments(a,t)):(a.level>=H&&d.push([this.makeCode("(")]),d.push([this.makeCode(b)]),
""!==(null!=(e=this.first.base)?e.value:void 0)&&d.push([this.makeCode(" ")]),d.push(this.first.compileToFragments(a,t)),a.level>=H&&d.push([this.makeCode(")")]));return this.joinFragmentArrays(d,"")};g.prototype.compilePower=function(a){var b;b=new I(new A("Math"),[new xa(new C("pow"))]);return(new ta(b,[this.first,this.second])).compileToFragments(a)};g.prototype.compileFloorDivision=function(a){var b,d;d=new I(new A("Math"),[new xa(new C("floor"))]);b=this.second.shouldCache()?new G(this.second):
this.second;b=new g("/",this.first,b);return(new ta(d,[b])).compileToFragments(a)};g.prototype.compileModulo=function(a){var b;b=new I(new r(Ia("modulo",a)));return(new ta(b,[this.first,this.second])).compileToFragments(a)};g.prototype.toString=function(b){return a.prototype.toString.call(this,b,this.constructor.name+" "+this.operator)};b={"\x3d\x3d":"\x3d\x3d\x3d","!\x3d":"!\x3d\x3d",of:"in",yieldfrom:"yield*"};e={"!\x3d\x3d":"\x3d\x3d\x3d","\x3d\x3d\x3d":"!\x3d\x3d"};g.prototype.children=["first",
"second"];return g}();k.In=J=function(){var b=function(b,c){var d;d=a.call(this)||this;d.object=b;d.array=c;return d};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d,c,e,h;if(this.array instanceof I&&this.array.isArray()&&this.array.base.objects.length){h=this.array.base.objects;d=0;for(c=h.length;d<c;d++)if(e=h[d],e instanceof K){b=!0;break}if(!b)return this.compileOrTest(a)}return this.compileLoopTest(a)};b.prototype.compileOrTest=function(a){var b,d,c,e,g,l,k,n,m,v;b=this.object.cache(a,
t);m=b[0];k=b[1];d=this.negated?[" !\x3d\x3d "," \x26\x26 "]:[" \x3d\x3d\x3d "," || "];b=d[0];d=d[1];v=[];n=this.array.base.objects;c=g=0;for(l=n.length;g<l;c=++g)e=n[c],c&&v.push(this.makeCode(d)),v=v.concat(c?k:m,this.makeCode(b),e.compileToFragments(a,h));return a.level<t?v:this.wrapInBraces(v)};b.prototype.compileLoopTest=function(a){var b,d,c;b=this.object.cache(a,u);c=b[0];d=b[1];b=[].concat(this.makeCode(Ia("indexOf",a)+".call("),this.array.compileToFragments(a,u),this.makeCode(", "),d,this.makeCode(") "+
(this.negated?"\x3c 0":"\x3e\x3d 0")));if(N(c)===N(d))return b;b=c.concat(this.makeCode(", "),b);return a.level<u?b:this.wrapInBraces(b)};b.prototype.toString=function(b){return a.prototype.toString.call(this,b,this.constructor.name+(this.negated?"!":""))};b.prototype.children=["object","array"];b.prototype.invert=R;return b}();k.Try=function(){var b=function(b,c,d,f){var e;e=a.call(this)||this;e.attempt=b;e.errorVariable=c;e.recovery=d;e.ensure=f;return e};$jscomp.inherits(b,a);b.prototype.jumps=
function(a){var b;return this.attempt.jumps(a)||(null!=(b=this.recovery)?b.jumps(a):void 0)};b.prototype.makeReturn=function(a){this.attempt&&(this.attempt=this.attempt.makeReturn(a));this.recovery&&(this.recovery=this.recovery.makeReturn(a));return this};b.prototype.compileNode=function(a){var b,d,c,e,h;a.indent+=ra;h=this.attempt.compileToFragments(a,x);b=this.recovery?(d=a.scope.freeVariable("error",{reserve:!1}),e=new A(d),this.errorVariable?(c=na(this.errorVariable.unwrapAll().value),c?this.errorVariable.error(c):
void 0,this.recovery.unshift(new ha(this.errorVariable,e))):void 0,[].concat(this.makeCode(" catch ("),e.compileToFragments(a),this.makeCode(") {\n"),this.recovery.compileToFragments(a,x),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:(d=a.scope.freeVariable("error",{reserve:!1}),[this.makeCode(" catch ("+d+") {}")]);a=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(a,x),this.makeCode("\n"+this.tab+"}")):[];return[].concat(this.makeCode(this.tab+
"try {\n"),h,this.makeCode("\n"+this.tab+"}"),b,a)};b.prototype.children=["attempt","recovery","ensure"];b.prototype.isStatement=da;return b}();k.Throw=la=function(){var b=function(b){var c;c=a.call(this)||this;c.expression=b;return c};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(a),this.makeCode(";"))};b.prototype.children=["expression"];b.prototype.isStatement=da;b.prototype.jumps=M;b.prototype.makeReturn=
Na;return b}();k.Existence=D=function(){var b=function(b){var c;c=a.call(this)||this;c.expression=b;return c};$jscomp.inherits(b,a);b.prototype.compileNode=function(a){var b,d,c;this.expression.front=this.front;c=this.expression.compile(a,t);this.expression.unwrap()instanceof A&&!a.scope.check(c)?(d=this.negated?["\x3d\x3d\x3d","||"]:["!\x3d\x3d","\x26\x26"],b=d[0],d=d[1],c="typeof "+c+" "+b+' "undefined" '+d+" "+c+" "+b+" null"):c=c+" "+(this.negated?"\x3d\x3d":"!\x3d")+" null";return[this.makeCode(a.level<=
n?c:"("+c+")")]};b.prototype.children=["expression"];b.prototype.invert=R;return b}();k.Parens=G=function(){var b=function(b){var c;c=a.call(this)||this;c.body=b;return c};$jscomp.inherits(b,a);b.prototype.unwrap=function(){return this.body};b.prototype.shouldCache=function(){return this.body.shouldCache()};b.prototype.compileNode=function(a){var b,d;b=this.body.unwrap();if(b instanceof I&&b.isAtomic())return b.front=this.front,b.compileToFragments(a);d=b.compileToFragments(a,H);return a.level<t&&
(b instanceof O||b instanceof ta||b instanceof l&&b.returns)?d:this.wrapInBraces(d)};b.prototype.children=["body"];return b}();k.StringWithInterpolations=ba=function(){var b=function(b){var c;c=a.call(this)||this;c.body=b;return c};$jscomp.inherits(b,a);b.prototype.unwrap=function(){return this};b.prototype.shouldCache=function(){return this.body.shouldCache()};b.prototype.compileNode=function(a){var b,d,c,e,h;c=this.body.unwrap();d=[];c.traverseChildren(!1,function(a){if(a instanceof Ma)d.push(a);
else if(a instanceof G)return d.push(a),!1;return!0});c=[];c.push(this.makeCode("`"));e=0;for(h=d.length;e<h;e++)b=d[e],b instanceof Ma?(b=b.value.slice(1,-1),b=b.replace(/(\\*)(`|\$\{)/g,function(a,b,d){return 0===b.length%2?b+"\\"+d:a}),c.push(this.makeCode(b))):(c.push(this.makeCode("${")),c.push.apply(c,[].concat($jscomp.arrayFromIterable(b.compileToFragments(a,H)))),c.push(this.makeCode("}")));c.push(this.makeCode("`"));return c};b.prototype.children=["body"];return b}();k.For=l=function(){var a=
function(a,b){var d;d=ja.call(this)||this;d.source=b.source;d.guard=b.guard;d.step=b.step;d.name=b.name;d.index=b.index;d.body=g.wrap([a]);d.own=!!b.own;d.object=!!b.object;d.from=!!b.from;d.from&&d.index&&d.index.error("cannot use index with for-from");d.own&&!d.object&&b.ownTag.error("cannot use own with for-"+(d.from?"from":"in"));d.object&&(a=[d.index,d.name],d.name=a[0],d.index=a[1]);d.index instanceof I&&!d.index.isAssignable()&&d.index.error("index cannot be a pattern matching expression");
d.range=d.source instanceof I&&d.source.base instanceof Z&&!d.source.properties.length&&!d.from;d.pattern=d.name instanceof I;d.range&&d.index&&d.index.error("indexes do not apply to range loops");d.range&&d.pattern&&d.name.error("cannot pattern match over range loops");d.returns=!1;return d};$jscomp.inherits(a,ja);a.prototype.compileNode=function(a){var b,d,c,e,h,l,k,n,m,p,v,t,q,H,y,z,w,E,D,C,M;b=g.wrap([this.body]);m=b.expressions;m=m[m.length-1];(null!=m?m.jumps():void 0)instanceof F&&(this.returns=
!1);y=this.range?this.source.base:this.source;c=a.scope;this.pattern||(n=this.name&&this.name.compile(a,u));m=this.index&&this.index.compile(a,u);n&&!this.pattern&&c.find(n);!m||this.index instanceof I||c.find(m);this.returns&&(k=c.freeVariable("results"));this.from?this.pattern&&(v=c.freeVariable("x",{single:!0})):v=this.object&&m||c.freeVariable("i",{single:!0});t=(this.range||this.from)&&n||m||v;q=t!==v?t+" \x3d ":"";this.step&&!this.range&&(m=this.cacheToCodeFragments(this.step.cache(a,u,Ya)),
h=m[0],D=m[1],this.step.isNumber()&&(E=Number(D)));this.pattern&&(n=v);l=m=M="";p=this.tab+ra;this.range?e=y.compileToFragments(wa(a,{index:v,name:n,step:this.step,shouldCache:Ya})):(C=this.source.compile(a,u),!n&&!this.own||this.source.unwrap()instanceof A||(l+=""+this.tab+(y=c.freeVariable("ref"))+" \x3d "+C+";\n",C=y),!n||this.pattern||this.from||(H=n+" \x3d "+C+"["+t+"]"),this.object||this.from||(h!==D&&(l+=""+this.tab+h+";\n"),n=0>E,this.step&&null!=E&&n||(d=c.freeVariable("len")),e=""+q+v+" \x3d 0, "+
d+" \x3d "+C+".length",h=""+q+v+" \x3d "+C+".length - 1",d=v+" \x3c "+d,c=v+" \x3e\x3d 0",this.step?(null!=E?n&&(d=c,e=h):(d=D+" \x3e 0 ? "+d+" : "+c,e="("+D+" \x3e 0 ? ("+e+") : "+h+")"),v=v+" +\x3d "+D):v=""+(t!==v?"++"+v:v+"++"),e=[this.makeCode(e+"; "+d+"; "+q+v)]));this.returns&&(z=""+this.tab+k+" \x3d [];\n",w="\n"+this.tab+"return "+k+";",b.makeReturn(k));this.guard&&(1<b.expressions.length?b.expressions.unshift(new B((new G(this.guard)).invert(),new aa("continue"))):this.guard&&(b=g.wrap([new B(this.guard,
b)])));this.pattern&&b.expressions.unshift(new ha(this.name,this.from?new A(t):new r(C+"["+t+"]")));k=[].concat(this.makeCode(l),this.pluckDirectCall(a,b));H&&(M="\n"+p+H+";");this.object?(e=[this.makeCode(t+" in "+C)],this.own&&(m="\n"+p+"if (!"+Ia("hasProp",a)+".call("+C+", "+t+")) continue;")):this.from&&(e=[this.makeCode(t+" of "+C)]);(a=b.compileToFragments(wa(a,{indent:p}),x))&&0<a.length&&(a=[].concat(this.makeCode("\n"),a,this.makeCode("\n")));return[].concat(k,this.makeCode(""+(z||"")+this.tab+
"for ("),e,this.makeCode(") {"+m+M),a,this.makeCode(this.tab+"}"+(w||"")))};a.prototype.pluckDirectCall=function(a,b){var d,f,e,h,g,l,k,n,m,p,v,r,t,u,q;f=[];m=b.expressions;g=l=0;for(k=m.length;l<k;g=++l)if(e=m[g],e=e.unwrapAll(),e instanceof ta&&(q=null!=(p=e.variable)?p.unwrapAll():void 0,q instanceof c||q instanceof I&&(null!=(v=q.base)?v.unwrapAll():void 0)instanceof c&&1===q.properties.length&&("call"===(r=null!=(t=q.properties[0].name)?t.value:void 0)||"apply"===r)))h=(null!=(u=q.base)?u.unwrapAll():
void 0)||q,n=new A(a.scope.freeVariable("fn")),d=new I(n),q.base&&(d=[d,q],q.base=d[0],d=d[1]),b.expressions[g]=new ta(d,e.args),f=f.concat(this.makeCode(this.tab),(new ha(n,h)).compileToFragments(a,x),this.makeCode(";\n"));return f};a.prototype.children=["body","source","guard","step"];return a}();k.Switch=function(){var b=function(b,c,d){var f;f=a.call(this)||this;f.subject=b;f.cases=c;f.otherwise=d;return f};$jscomp.inherits(b,a);b.prototype.jumps=function(a){a=void 0===a?{block:!0}:a;var b,d,
c,e,h;e=this.cases;d=0;for(c=e.length;d<c;d++)if(b=e[d],b=b[1],b=b.jumps(a))return b;return null!=(h=this.otherwise)?h.jumps(a):void 0};b.prototype.makeReturn=function(a){var b,d,c,e,h;e=this.cases;b=0;for(d=e.length;b<d;b++)c=e[b],c[1].makeReturn(a);a&&(this.otherwise||(this.otherwise=new g([new r("void 0")])));null!=(h=this.otherwise)&&h.makeReturn(a);return this};b.prototype.compileNode=function(a){var b,d,c,e,h,g,l,k,n,m,p,t,u;l=a.indent+ra;k=a.indent=l+ra;g=[].concat(this.makeCode(this.tab+"switch ("),
this.subject?this.subject.compileToFragments(a,H):this.makeCode("false"),this.makeCode(") {\n"));t=this.cases;h=n=0;for(m=t.length;n<m;h=++n){b=t[h];e=b[0];b=b[1];u=ea([e]);e=0;for(p=u.length;e<p;e++)c=u[e],this.subject||(c=c.invert()),g=g.concat(this.makeCode(l+"case "),c.compileToFragments(a,H),this.makeCode(":\n"));0<(d=b.compileToFragments(a,x)).length&&(g=g.concat(d,this.makeCode("\n")));if(h===this.cases.length-1&&!this.otherwise)break;h=this.lastNonComment(b.expressions);h instanceof F||h instanceof
r&&h.jumps()&&"debugger"!==h.value||g.push(c.makeCode(k+"break;\n"))}this.otherwise&&this.otherwise.expressions.length&&g.push.apply(g,[].concat([this.makeCode(l+"default:\n")],$jscomp.arrayFromIterable(this.otherwise.compileToFragments(a,x)),[this.makeCode("\n")]));g.push(this.makeCode(this.tab+"}"));return g};b.prototype.children=["subject","cases","otherwise"];b.prototype.isStatement=da;return b}();k.If=B=function(){var b=function(b,c,d){var f;d=void 0===d?{}:d;f=a.call(this)||this;f.body=c;f.condition=
"unless"===d.type?b.invert():b;f.elseBody=null;f.isChain=!1;f.soak=d.soak;return f};$jscomp.inherits(b,a);b.prototype.bodyNode=function(){var a;return null!=(a=this.body)?a.unwrap():void 0};b.prototype.elseBodyNode=function(){var a;return null!=(a=this.elseBody)?a.unwrap():void 0};b.prototype.addElse=function(a){this.isChain?this.elseBodyNode().addElse(a):(this.isChain=a instanceof b,this.elseBody=this.ensureBlock(a),this.elseBody.updateLocationDataIfMissing(a.locationData));return this};b.prototype.isStatement=
function(a){var b;return(null!=a?a.level:void 0)===x||this.bodyNode().isStatement(a)||(null!=(b=this.elseBodyNode())?b.isStatement(a):void 0)};b.prototype.jumps=function(a){var b;return this.body.jumps(a)||(null!=(b=this.elseBody)?b.jumps(a):void 0)};b.prototype.compileNode=function(a){return this.isStatement(a)?this.compileStatement(a):this.compileExpression(a)};b.prototype.makeReturn=function(a){a&&(this.elseBody||(this.elseBody=new g([new r("void 0")])));this.body&&(this.body=new g([this.body.makeReturn(a)]));
this.elseBody&&(this.elseBody=new g([this.elseBody.makeReturn(a)]));return this};b.prototype.ensureBlock=function(a){return a instanceof g?a:new g([a])};b.prototype.compileStatement=function(a){var c,d,f,e;c=ka(a,"chainChild");if(ka(a,"isExistentialEquals"))return(new b(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(a);e=a.indent+ra;f=this.condition.compileToFragments(a,H);d=this.ensureBlock(this.body).compileToFragments(wa(a,{indent:e}));d=[].concat(this.makeCode("if ("),
f,this.makeCode(") {\n"),d,this.makeCode("\n"+this.tab+"}"));c||d.unshift(this.makeCode(this.tab));if(!this.elseBody)return d;c=d.concat(this.makeCode(" else "));this.isChain?(a.chainChild=!0,c=c.concat(this.elseBody.unwrap().compileToFragments(a,x))):c=c.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(wa(a,{indent:e}),x),this.makeCode("\n"+this.tab+"}"));return c};b.prototype.compileExpression=function(a){var b,d,c;c=this.condition.compileToFragments(a,n);d=this.bodyNode().compileToFragments(a,
u);b=this.elseBodyNode()?this.elseBodyNode().compileToFragments(a,u):[this.makeCode("void 0")];b=c.concat(this.makeCode(" ? "),d,this.makeCode(" : "),b);return a.level>=n?this.wrapInBraces(b):b};b.prototype.unfoldSoak=function(){return this.soak&&this};b.prototype.children=["condition","body","elseBody"];return b}();ma={extend:function(a){return"function(child, parent) { for (var key in parent) { if ("+Ia("hasProp",a)+".call(parent, key)) child[key] \x3d parent[key]; } function ctor() { this.constructor \x3d child; } ctor.prototype \x3d parent.prototype; child.prototype \x3d new ctor(); return child; }"},
bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i \x3d 0, l \x3d this.length; i \x3c l; i++) { if (i in this \x26\x26 this[i] \x3d\x3d\x3d item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b \x3d +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}};x=1;H=2;u=3;n=4;t=5;h=6;ra=" ";ca=/^[+-]?\d+$/;Ia=
function(a,c){var b,d;d=c.scope.root;if(a in d.utilities)return d.utilities[a];b=d.freeVariable(a);d.assign(b,ma[a](c));return d.utilities[a]=b};Qa=function(a,c){a=a.replace(/\n/g,"$\x26"+c);return a.replace(/\s+$/,"")};qa=function(a){return a instanceof A&&"arguments"===a.value};va=function(a){return a instanceof za||a instanceof c&&a.bound};Ya=function(a){return a.shouldCache()||("function"===typeof a.isAssignable?a.isAssignable():void 0)};Ra=function(a,c,e){if(a=c[e].unfoldSoak(a))return c[e]=
a.body,a.body=new I(c),a}}).call(this);return k}();q["./sourcemap"]=function(){var k={};(function(){var q=function(k){this.line=k;this.columns=[]};q.prototype.add=function(k,q,a){var g;g=q[0];q=q[1];void 0===a&&(a={});if(!this.columns[k]||!a.noReplace)return this.columns[k]={line:this.line,column:k,sourceLine:g,sourceColumn:q}};q.prototype.sourceLocation=function(k){for(var q;!((q=this.columns[k])||0>=k);)k--;return q&&[q.sourceLine,q.sourceColumn]};k=function(){var k,ha,a,g,ta=function(){this.lines=
[]};ta.prototype.add=function(a,c,e){e=void 0===e?{}:e;var g,k;k=c[0];c=c[1];return((g=this.lines)[k]||(g[k]=new q(k))).add(c,a,e)};ta.prototype.sourceLocation=function(a){var c,e;c=a[0];for(a=a[1];!((e=this.lines[c])||0>=c);)c--;return e&&e.sourceLocation(a)};ta.prototype.generate=function(a,c){a=void 0===a?{}:a;c=void 0===c?null:c;var e,g,k,m,q,l,E,A,B,J,p,ha,h;q=l=m=h=0;J=!1;e="";p=this.lines;k=g=0;for(E=p.length;g<E;k=++g)if(k=p[k])for(ha=k.columns,k=0,A=ha.length;k<A;k++)if(B=ha[k]){for(;h<B.line;)m=
0,J=!1,e+=";",h++;J&&(e+=",");e+=this.encodeVlq(B.column-m);m=B.column;e+=this.encodeVlq(0);e+=this.encodeVlq(B.sourceLine-l);l=B.sourceLine;e+=this.encodeVlq(B.sourceColumn-q);q=B.sourceColumn;J=!0}e={version:3,file:a.generatedFile||"",sourceRoot:a.sourceRoot||"",sources:a.sourceFiles||[""],names:[],mappings:e};a.inlineMap&&(e.sourcesContent=[c]);return e};ta.prototype.encodeVlq=function(k){var c,e;c="";for(e=(Math.abs(k)<<1)+(0>k?1:0);e||!c;)k=e&g,(e>>=a)&&(k|=ha),c+=this.encodeBase64(k);return c};
ta.prototype.encodeBase64=function(a){var c;if(!(c=k[a]))throw Error("Cannot Base64 encode value: "+a);return c};a=5;ha=1<<a;g=ha-1;k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return ta}()}).call(this);return k}();q["./coffeescript"]=function(){var k={};(function(){var ra,sa,ha,a,g,ta,m,c,e,y,D,w,z,l,E,A,B,J,p,ua={}.hasOwnProperty;c=q("fs");p=q("vm");E=q("path");ra=q("./lexer").Lexer;l=q("./parser").parser;y=q("./helpers");sa=q("./sourcemap");g=q("../../package.json");k.VERSION=
g.version;k.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"];k.helpers=y;ha=function(a){switch(!1){case "function"!==typeof Buffer:return Buffer.from(a).toString("base64");case "function"!==typeof btoa:return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,c){return String.fromCharCode("0x"+c)}));default:throw Error("Unable to base64 encode inline sourcemap.");}};g=function(a){return function(c,e){e=void 0===e?{}:e;try{return a.call(this,c,e)}catch(t){if("string"!==typeof c)throw t;
throw y.updateSyntaxError(t,c,e.filename);}}};J={};B={};k.compile=a=g(function(a,c){var e,h,g,k,n,m,p,q,A,w,E,D,P;g=y.extend;c=g({},c);m=c.sourceMap||c.inlineMap||null==c.filename;g=c.filename||"\x3canonymous\x3e";J[g]=a;m&&(w=new sa);h=z.tokenize(a,c);k=c;A=[];n=0;for(p=h.length;n<p;n++)e=h[n],"IDENTIFIER"===e[0]&&A.push(e[1]);k.referencedVars=A;if(null==c.bare||!0!==c.bare)for(k=0,n=h.length;k<n;k++)if(e=h[k],"IMPORT"===(q=e[0])||"EXPORT"===q){c.bare=!0;break}n=l.parse(h).compileToFragments(c);
h=0;c.header&&(h+=1);c.shiftLine&&(h+=1);e=0;q="";p=0;for(A=n.length;p<A;p++)k=n[p],m&&(k.locationData&&!/^[;\s]*$/.test(k.code)&&w.add([k.locationData.first_line,k.locationData.first_column],[h,e],{noReplace:!0}),E=y.count(k.code,"\n"),h+=E,e=E?k.code.length-(k.code.lastIndexOf("\n")+1):e+k.code.length),q+=k.code;c.header&&(e="Generated by CoffeeScript "+this.VERSION,q="// "+e+"\n"+q);m&&(P=w.generate(c,a),B[g]=w);c.inlineMap&&(a=ha(JSON.stringify(P)),g="//# sourceURL\x3d"+(null!=(D=c.filename)?
D:"coffeescript"),q=q+"\n"+("//# sourceMappingURL\x3ddata:application/json;base64,"+a)+"\n"+g);return c.sourceMap?{js:q,sourceMap:w,v3SourceMap:JSON.stringify(P,null,2)}:q});k.tokens=g(function(a,c){return z.tokenize(a,c)});k.nodes=g(function(a,c){return"string"===typeof a?l.parse(z.tokenize(a,c)):l.parse(a)});k.run=function(e,g){g=void 0===g?{}:g;var h,k,l;k=q.main;k.filename=process.argv[1]=g.filename?c.realpathSync(g.filename):"\x3canonymous\x3e";k.moduleCache&&(k.moduleCache={});h=null!=g.filename?
E.dirname(c.realpathSync(g.filename)):c.realpathSync(".");k.paths=q("module")._nodeModulePaths(h);if(!y.isCoffee(k.filename)||q.extensions)e=a(e,g),e=null!=(l=e.js)?l:e;return k._compile(e,k.filename)};k.eval=function(c,e){e=void 0===e?{}:e;var h,g,k,l,m,n,y,z,A,w;if(c=c.trim()){l=null!=(m=p.Script.createContext)?m:p.createContext;m=null!=(k=p.isContext)?k:function(a){return e.sandbox instanceof l().constructor};if(l){if(null!=e.sandbox){if(m(e.sandbox))w=e.sandbox;else for(n in w=l(),m=e.sandbox,
m)ua.call(m,n)&&(k=m[n],w[n]=k);w.global=w.root=w.GLOBAL=w}else w=global;w.__filename=e.filename||"eval";w.__dirname=E.dirname(w.__filename);if(w===global&&!w.module&&!w.require){h=q("module");w.module=g=new h(e.modulename||"eval");w.require=k=function(a){return h._load(a,g,!0)};g.filename=w.__filename;A=Object.getOwnPropertyNames(q);m=0;for(y=A.length;m<y;m++)z=A[m],"paths"!==z&&"arguments"!==z&&"caller"!==z&&(k[z]=q[z]);k.paths=g.paths=h._nodeModulePaths(process.cwd());k.resolve=function(a){return h._resolveFilename(a,
g)}}}m={};for(n in e)ua.call(e,n)&&(k=e[n],m[n]=k);m.bare=!0;c=a(c,m);return w===global?p.runInThisContext(c):p.runInContext(c,w)}};k.register=function(){return q("./register")};if(q.extensions)for(A=this.FILE_EXTENSIONS,ta=function(a){var c;return null!=(c=q.extensions)[a]?c[a]:c[a]=function(){throw Error("Use CoffeeScript.register() or require the coffeescript/register module to require "+a+" files.");}},D=0,w=A.length;D<w;D++)g=A[D],ta(g);k._compileFile=function(e,g,k){g=void 0===g?!1:g;k=void 0===
k?!1:k;var h,l;l=c.readFileSync(e,"utf8");l=65279===l.charCodeAt(0)?l.substring(1):l;try{h=a(l,{filename:e,sourceMap:g,inlineMap:k,sourceFiles:[e],literate:y.isLiterate(e)})}catch(x){throw y.updateSyntaxError(x,l,e);}return h};z=new ra;l.lexer={lex:function(){var a,c;(c=l.tokens[this.pos++])?(a=c[0],this.yytext=c[1],this.yylloc=c[2],l.errorToken=c.origin||c,this.yylineno=this.yylloc.first_line):a="";return a},setInput:function(a){l.tokens=a;return this.pos=0},upcomingInput:function(){return""}};l.yy=
q("./nodes");l.yy.parseError=function(a,c){var e,h,g,k;g=l.errorToken;k=l.tokens;e=g[0];h=g[1];a=g[2];h=function(){switch(!1){case g!==k[k.length-1]:return"end of input";case "INDENT"!==e&&"OUTDENT"!==e:return"indentation";case "IDENTIFIER"!==e&&"NUMBER"!==e&&"INFINITY"!==e&&"STRING"!==e&&"STRING_START"!==e&&"REGEX"!==e&&"REGEX_START"!==e:return e.replace(/_START$/,"").toLowerCase();default:return y.nameWhitespaceCharacter(h)}}();return y.throwSyntaxError("unexpected "+h,a)};m=function(a,c){var e,
g,h,k;a.isNative()?e="native":(a.isEval()?(g=a.getScriptNameOrSourceURL())||a.getEvalOrigin():g=a.getFileName(),g||(g="\x3canonymous\x3e"),h=a.getLineNumber(),e=a.getColumnNumber(),e=(c=c(g,h,e))?g+":"+c[0]+":"+c[1]:g+":"+h+":"+e);g=a.getFunctionName();h=a.isConstructor();if(a.isToplevel()||h)return h?"new "+(g||"\x3canonymous\x3e")+" ("+e+")":g?g+" ("+e+")":e;h=a.getMethodName();k=a.getTypeName();return g?(c=a="",k&&g.indexOf(k)&&(c=k+"."),h&&g.indexOf("."+h)!==g.length-h.length-1&&(a=" [as "+h+
"]"),""+c+g+a+" ("+e+")"):k+"."+(h||"\x3canonymous\x3e")+" ("+e+")"};e=function(c){return null!=B[c]?B[c]:null!=B["\x3canonymous\x3e"]?B["\x3canonymous\x3e"]:null!=J[c]?(c=a(J[c],{filename:c,sourceMap:!0,literate:y.isLiterate(c)}),c.sourceMap):null};Error.prepareStackTrace=function(a,c){var g,h,l;l=function(a,c,g){var h;a=e(a);null!=a&&(h=a.sourceLocation([c-1,g-1]));return null!=h?[h[0]+1,h[1]+1]:null};h=function(){var a,e,h;h=[];a=0;for(e=c.length;a<e;a++){g=c[a];if(g.getFunction()===k.run)break;
h.push(" at "+m(g,l))}return h}();return a.toString()+"\n"+h.join("\n")+"\n"}}).call(this);return k}();q["./browser"]=function(){(function(){var k,ra,sa,ha=[].indexOf||function(a){for(var g=0,k=this.length;g<k;g++)if(g in this&&this[g]===a)return g;return-1};k=q("./coffeescript");k.require=q;ra=k.compile;k.eval=function(a,g){g=void 0===g?{}:g;null==g.bare&&(g.bare=!0);return eval(ra(a,g))};k.run=function(a,g){g=void 0===g?{}:g;g.bare=!0;g.shiftLine=!0;return Function(ra(a,g))()};"undefined"!==
typeof window&&null!==window&&("undefined"!==typeof btoa&&null!==btoa&&"undefined"!==typeof JSON&&null!==JSON&&(ra=function(a,g){g=void 0===g?{}:g;g.inlineMap=!0;return k.compile(a,g)}),k.load=function(a,g,q,m){q=void 0===q?{}:q;m=void 0===m?!1:m;var c;q.sourceFiles=[a];c=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest;c.open("GET",a,!0);"overrideMimeType"in c&&c.overrideMimeType("text/plain");c.onreadystatechange=function(){var e;if(4===c.readyState){if(0===
(e=c.status)||200===e)e=[c.responseText,q],m||k.run.apply(k,[].concat($jscomp.arrayFromIterable(e)));else throw Error("Could not load "+a);if(g)return g(e)}};return c.send(null)},sa=function(){var a,g,q,m,c,e,y,D,w,z,l;l=window.document.getElementsByTagName("script");g=["text/coffeescript","text/literate-coffeescript"];a=function(){var a,c,e,k;k=[];a=0;for(c=l.length;a<c;a++)w=l[a],(e=w.type,0<=ha.call(g,e))&&k.push(w);return k}();e=0;q=function(){var c;c=a[e];if(c instanceof Array)return k.run.apply(k,
[].concat($jscomp.arrayFromIterable(c))),e++,q()};m=function(c,e){var l,m;l={literate:c.type===g[1]};if(m=c.src||c.getAttribute("data-src"))return l.filename=m,k.load(m,function(c){a[e]=c;return q()},l,!0);l.filename=c.id&&""!==c.id?c.id:"coffeescript"+(0!==e?e:"");l.sourceFiles=["embedded"];return a[e]=[c.innerHTML,l]};c=y=0;for(D=a.length;y<D;c=++y)z=a[c],m(z,c);return q()},window.addEventListener?window.addEventListener("DOMContentLoaded",sa,!1):window.attachEvent("onload",sa))}).call(this);return{}}();
return q["./coffeescript"]}();"function"===typeof define&&define.amd?define(function(){return ra}):q.CoffeeScript=ra})(this);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
launch() if ignition is on
volume: 10 if band isnt spinal_tap
let_the_wild_rumpus_begin() unless answer is no
if car.speed < speed_limit then accelerate().

View File

@@ -0,0 +1,5 @@
# Eat lunch.
lunch: food.eat() for food in ['toast', 'cheese', 'wine'].
# Zebra-stripe a table.
highlight(row) for row, i in table if i % 2 is 0.

View File

@@ -0,0 +1,2 @@
greeting: "Hello CoffeeScript"
difficulty: 0.5

View File

@@ -0,0 +1,9 @@
mood: greatly_improved if singing
if happy and knows_it
claps_hands()
cha_cha_cha().
date: if friday then sue else jill.
expensive ||= do_the_math()

View File

@@ -1,3 +1,5 @@
hi = `function() {
hi: `function() {
return [document.title, "Hello JavaScript"].join(": ");
}`

View File

@@ -0,0 +1,9 @@
grade: student =>
if student.excellent_work
"A+"
else if student.okay_stuff
if student.tried_hard then "B" else "B-".
else
"C"..
eldest: if 24 > 21 then "Liz" else "Ike".

View File

@@ -0,0 +1 @@
six: (one: 1) + (two: 2) + (three: 3)

View File

@@ -0,0 +1,2 @@
square: x => x * x.
cube: x => square(x) * x.

View File

@@ -0,0 +1,6 @@
song: ["do", "re", "mi", "fa", "so"]
ages: {
max: 10
ida: 9
tim: 11
}

View File

@@ -0,0 +1,22 @@
# Assignment:
number: 42
opposite_day: true
# Conditions:
number: -42 if opposite_day
# Functions:
square: x => x * x.
# Arrays:
list: [1, 2, 3, 4, 5]
# Objects:
math: {
root: Math.sqrt
square: square
cube: x => x * square(x).
}
# Array comprehensions:
cubed_list: math.cube(num) for num in list.

View File

@@ -0,0 +1,5 @@
num: 1
change_numbers: =>
num: 2
new_num: 3.
new_num: change_numbers()

View File

@@ -0,0 +1,6 @@
numbers: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
three_to_six: numbers[3..6]
numbers_copy: numbers[0...numbers.length]

View File

@@ -0,0 +1,8 @@
moby_dick: "Call me Ishmael. Some years ago --
never mind how long precisely -- having little
or no money in my purse, and nothing particular
to interest me on shore, I thought I would sail
about a little and see the watery part of the
world..."

View File

@@ -0,0 +1,25 @@
Animal: => .
Animal.prototype.move: meters =>
alert(this.name + " moved " + meters + "m.").
Snake: name => this.name: name.
Snake extends Animal
Snake.prototype.move: =>
alert("Slithering...")
super(5).
Horse: name => this.name: name.
Horse extends Animal
Horse.prototype.move: =>
alert("Galloping...")
super(45).
sam: new Snake("Sammy the Python")
tom: new Horse("Tommy the Palomino")
sam.move()
tom.move()

View File

@@ -0,0 +1,9 @@
switch day
when "Tuesday" then eat_breakfast()
when "Wednesday" then go_to_the_park()
when "Saturday"
if day is bingo_day
go_to_bingo()
go_dancing().
when "Sunday" then go_to_church()
else go_to_work().

View File

@@ -0,0 +1,7 @@
try
all_hell_breaks_loose()
cats_and_dogs_living_together()
catch error
print(error)
finally
clean_up().

View File

@@ -0,0 +1,5 @@
while demand > supply
sell()
restock().
while supply > demand then buy().

147
documentation/css/amy.css Normal file
View File

@@ -0,0 +1,147 @@
pre.amy .PolymorphicVariants {
color: #60B0FF;
font-style: italic;
}
pre.amy .KeywordDecorator {
color: #D0D0FF;
}
pre.amy .Punctuation {
color: #805080;
}
pre.amy .InheritedClass {
}
pre.amy .InvalidDepricated {
background-color: #CC66FF;
color: #200020;
}
pre.amy .LibraryVariable {
}
pre.amy .TokenReferenceOcamlyacc {
color: #3CB0D0;
}
pre.amy .Storage {
color: #B0FFF0;
}
pre.amy .KeywordOperator {
color: #A0A0FF;
}
pre.amy .CharacterConstant {
color: #666666;
}
pre.amy .line-numbers {
background-color: #800000;
color: #000000;
}
pre.amy .ClassName {
color: #70E080;
}
pre.amy .Int64Constant {
font-style: italic;
}
pre.amy .NonTerminalReferenceOcamlyacc {
color: #C0F0F0;
}
pre.amy .TokenDefinitionOcamlyacc {
color: #3080A0;
}
pre.amy .ClassType {
color: #70E0A0;
}
pre.amy .ControlKeyword {
color: #80A0FF;
}
pre.amy .LineNumberDirectives {
text-decoration: underline;
color: #C080C0;
}
pre.amy .FloatingPointConstant {
text-decoration: underline;
}
pre.amy .Int32Constant {
font-weight: bold;
}
pre.amy .TagName {
color: #009090;
}
pre.amy .ModuleTypeDefinitions {
text-decoration: underline;
color: #B000B0;
}
pre.amy .Integer {
color: #7090B0;
}
pre.amy .Camlp4TempParser {
}
pre.amy .InvalidIllegal {
font-weight: bold;
background-color: #FFFF00;
color: #400080;
}
pre.amy .LibraryConstant {
background-color: #200020;
}
pre.amy .ModuleDefinitions {
color: #B000B0;
}
pre.amy .Variants {
color: #60B0FF;
}
pre.amy .CompilerDirectives {
color: #C080C0;
}
pre.amy .FloatingPointInfixOperator {
text-decoration: underline;
}
pre.amy .BuiltInConstant1 {
}
pre.amy {
background-color: #200020;
color: #D0D0FF;
}
pre.amy .FunctionArgument {
color: #80B0B0;
}
pre.amy .FloatingPointPrefixOperator {
text-decoration: underline;
}
pre.amy .NativeintConstant {
font-weight: bold;
}
pre.amy .BuiltInConstant {
color: #707090;
}
pre.amy .BooleanConstant {
color: #8080A0;
}
pre.amy .LibraryClassType {
}
pre.amy .TagAttribute {
}
pre.amy .Keyword {
color: #A080FF;
}
pre.amy .UserDefinedConstant {
}
pre.amy .String {
color: #999999;
}
pre.amy .Camlp4Code {
background-color: #350060;
}
pre.amy .NonTerminalDefinitionOcamlyacc {
color: #90E0E0;
}
pre.amy .FunctionName {
color: #50A0A0;
}
pre.amy .SupportModules {
color: #A00050;
}
pre.amy .Variable {
color: #008080;
}
pre.amy .Comment {
background-color: #200020;
color: #404080;
font-style: italic;
}

Some files were not shown because too many files have changed in this diff Show More